Login
`
Templates, Tools and Utilities
|
||
Add a comment to an Icetips ArticlePlease add your comments to this article.
Please note that you must provide both a name and a valid email address in order
for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!
Back to article list Search Articles Add Comment Printer friendly Direct link Par2: Recover() - recovering held records 1998-05-05 -- Maarten Veenstra From the help-file:
SEND(file,'RECOVER=n')
The RECOVER string, when n is greater than 0, UNLOCKs data files, RELEASEs held
records, and rolls back incomplete transactions in order to recover from a system crash.
See also Transaction Processing for Clarion Files.
n represents the number of seconds to wait before invoking the recovery process.
When n is equal to 1, the recovery process is invoked immediately. When
n is equal to 0, the recovery process is disarmed.
There are two ways of using RECOVER:
SEND(file,RECOVER=n)
OPEN(file)
This releases a lock on a file that was locked when a machine crashed. It also rolls
back a transaction that was in process when a system crashed.
SEND(file,RECOVER=n)
GET or NEXT or PREVIOUS
This removes a hold flag on a record from records that where held when a machine
crashed. Here is a piece of code that removes all hold flags from a file:
OPEN(file) !make sure no one else is using the file
SEND(file,'IGNORESTATUS=ON')
SET(file)
LOOP
NEXT(file)
IF ERRORCODE() THEN BREAK.
IF SEND(file,'HELD') = 'ON' THEN
SEND(file,'RECOVER=1')
REGET(file,POSITION(file))
END
END
RECOVER may not be used as a DRIVER string--you may only use it with the SEND
function. The SEND function returns a blank string.
Today is December 3, 2024, 11:44 am This article has been viewed 35194 times.
|
|