William -
Been there. Done that. Didn't work. You can't delete or rename a
file which has system SHARE (or whatever name the system file locking
process goes by) locks set on it.
Bernie
---------------------------------------
At 11:07 AM 12/5/2002 -0500, you wrote:
>This is what we do here:
> SET MULTI off
>
> -- Move the directory
> CD \Database
>
> -- Delete the old backup
> DELETE OldDB.rb?
>
> -- Rename name the current database to OldDB
> WHILE 1 = 1 THEN
> RENAME CurrDB.rb? OldDB.rb?
> IF derr = 0 THEN; BREAK; ENDIF
> ENDWHILE
>
> -- Reload the database to a temporary name
> LABEL conn1
> CONNECT OldDB
> IF derr <> 0 THEN
> -- Add any error notification here.
> -- In case there is a problem during the first rename.
> GOTO conn1
> ENDIF
> RELOAD NewDB
> DISCONNECT
>
> -- Flag the new copy as sharable and rename to Prop
> ZIP FLAG NewDB.rb? RWSH
> RENAME NewDB.rb? CurrDB.rb?
>
>The only way that I could insure that no one entered the database
>between the DISCONNECT and the DELETE was to RENAME the files before the
>RELOAD then RENAME the files back to original name. This also gives me
>a backup of the database to I can easily access without having to go to
>the tape.
>
>Hope it helps,
>Bill
>
>-----Original Message-----
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>On Behalf Of Dennis Fleming
>Sent: Wednesday, December 04, 2002 5:46 PM
>To: [EMAIL PROTECTED]
>Subject: Phantom User?
>
>RBase 6.5++
>
>We've had a couple of post on this one and I am still trying to nail it
>down.
>
>In my Reload code I make sure that only one user is using our multi user
>app by attempting to Set Multi Off, and then if Reload has no errors:
>
>Disconnect
>Delete old_dbname.rb?
>Rename new_dbname.rb? old_dbname.rb?
>Connect old_dbname
>....
>
>And, I get:
>
>-ERROR- Cannot delete connected database. (2078)
>Failed renaming .... Etc.
>
>If the user doing the Reload is the only user, then why doesn't
>Disconnect
>work? I can check there is no error on the Disconnect command. (I'm
>assuming the next command won't be executed until all modifications are
>writing to disk and the data base is closed, but that may not be the
>case.)
>Any help appreciated,
>
>Dennis
>*****
>
>
>Dennis Fleming
>IISCO
>http://www.TheBestCMMS.com
>Phone: 570 775-7593
>Fax: 570 775-9797
>================================================
>TO SEE MESSAGE POSTING GUIDELINES:
>Send a plain text email to [EMAIL PROTECTED]
>In the message body, put just two words: INTRO rbase-l
>================================================
>TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
>In the message body, put just two words: UNSUBSCRIBE rbase-l
>================================================
>TO SEARCH ARCHIVES:
>http://www.mail-archive.com/rbase-l%40sonetmail.com/
>
>================================================
>TO SEE MESSAGE POSTING GUIDELINES:
>Send a plain text email to [EMAIL PROTECTED]
>In the message body, put just two words: INTRO rbase-l
>================================================
>TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
>In the message body, put just two words: UNSUBSCRIBE rbase-l
>================================================
>TO SEARCH ARCHIVES:
>http://www.mail-archive.com/rbase-l%40sonetmail.com/
>
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: INTRO rbase-l
================================================
TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: UNSUBSCRIBE rbase-l
================================================
TO SEARCH ARCHIVES:
http://www.mail-archive.com/rbase-l%40sonetmail.com/