RE: TZF - Network Program ... try/finally
DeMoville_Brent <[email protected]> Wed, 11 Jun 2003 08:27:49 -0500
| Newsgroups | gmane.comp.lang.delphi.topaz |
|---|---|
| Message-ID | <[email protected]> |
Bob: Like Phil, I have also wrestled with this issue. If I need to pack in the middle of the day, I have to ask the users to log-off. If the pack can wait, I set my program where pack is part of the exit routine. When the last user logs off, the routine executes and packs the deletes for the day. The challenge for mid-day packs is discovering who has the file open. In my environment, there are 300 potential users. When we ran on Novell, the Whohasit utility would allow me to see who had the file open so I could send an email. I haven't found a similar alternative in the Windows 2000 environment. Brent -----Original Message----- From: Philip Kidder [mailto:[email protected]] Sent: Wednesday, June 11, 2003 7:23 AM To: [email protected] Subject: Re: TZF - Network Program ... try/finally Bob, In order to Pack a database it must be opened exclusive. Your finanally code just opens the database on the one computer exclusive. The second computer still has the file open so your finally code should fail to open that database since it wants exclusive use of the database. You need to get the second computer out of the program then you can Pack. I've had this problem for years a one clients. All I can do is ask everyone to get out of any programs that use the database for a few minutes while I Pack or Reindex. Phil ----- Original Message ----- From: [email protected] To: [email protected] Sent: Tuesday, June 10, 2003 9:24 PM Subject: TZF - Network Program ... try/finally In developing a network program, I am trying to use a "try/finally" structure to allow the physical deletion of records (PACK). I am getting a File Sharing error ( Error # 32 ) when I try to pack and there are two users in the system. My Try/Finally looks like this: try // this will create an exception if another user is using the system DM.DBF_Courts.Active:=False; DM.DBF_Courts.Exclusive:=True; DM.DBF_Courts.Active:=True; DM.DBF_Courts.Pack; finally // but I thought this would "clear" the exception DM.DBF_Courts.Active:=False; DM.DBF_Courts.Exclusive:=False; DM.DBF_Courts.Open; end; Thanks, Bob Watson Atlanta, GA ==^================================================================ This email was sent to: [email protected] EASY UNSUBSCRIBE click here: http://topica.com/u/?clvXPN.a5kvff.Z2NsZHQt Or send an email to: [email protected] TOPICA - Start your own email discussion group. FREE! http://www.topica.com/partner/tag02/create/index2.html ==^================================================================