9.9.2 SetRetryMode (set the lock error retry function)
- Purpose
-
Sets the lock error retry function.
- Syntax
SetRetryMode(Count [,WaitTime])
- Arguments
-
- Count
-
Specify the retry count as a number in the range from 0 to 100, or as a variable that stores this value.
If you specify 0, the retry function is canceled.
- WaitTime
-
Specify retry wait time as a number (milliseconds) in the range from 100 to 60,000, or as a variable that stores this value.
This value is optional. If you omit this value, 100 is assumed.
- Description
-
The SetRetryMode command retries access according to the specified retry count and retry wait time if a lock error occurs in a command or statement that can be used with the lock error retry function.
The specified retry count and retry wait time are effective until the ResetRetryMode command is executed.
- Example
Dim BkupFileName, FileNo TempFile( BkupFileName, "BUP", _TEMP_ ) Copy( _TEMP + "MODE.INF", BkupFileName ) DeleteFile( _TEMP_ + "MODE.INF" ) ' Disk write might delay SetRetryMode( 5, 100 ) ' Set retry. FileNo = TextOpen( _TEMP_ + "MODE.INF", CREATE ) ResetRetryMode ' Cancel retry. If FileNo = 0 Then MessageBox( _TEMP_ + "Failed to open MODE.INF", OK ) Exit 2 Else TextWrite( FileNo, "Mode=ReadOnly" ) End If TextClose( FileNo )
- JP1/Script version
-
Supported from JP1/Script 10-00.