Please enable JavaScript to view this site.

R:BASE 11 Help

Navigation: Command Index > S > SET

TIMEOUT

Scroll Prev Top Next More

Operating Condition

 

Syntax: SET TIMEOUT value

 

Range: 0 to 1440

 

Default: 0

 

Use TIMEOUT to shut down an inactive R:BASE session and exit to the operating system after a set amount of time passes. A countdown is always running if a TIMEOUT is set. The countdown will reset when keyboard or mouse activity is detected or if commands are running where table rows are being processed. This is a useful feature for automatically disconnecting idle R:BASE sessions for scheduled database maintenance.

 

The default for TIMEOUT is 0 (zero), which does not activate a countdown. TIMEOUT is set in minutes (not seconds), and all workstations must set TIMEOUT separately.

 

The following command line will exit a user to Windows after the user's workstation is inactive for one hour:

 

SET TIMEOUT 60

 

When a TIMEOUT occurs, a routine in the form of a command file, RUN SELECT, or CALL to a stored procedure can be executed. However, the routine cannot include a DIALOG, FILLIN, or PAUSE command, or expect a keystroke. To execute a routine when a TIMEOUT occurs, the command file name or single-line command (RUN, CALL, etc.) may be passed to R:BASE with the RBTI_TIMEOUT variable.

 

Examples:

 

Command file example:

SET VARIABLE RBTI_TIMEOUT TEXT = 'C:\CustDB\CleanUp.rmd'

 

RUN SELECT example:

SET VARIABLE RBTI_TIMEOUT TEXT = 'RUN SELECT CmdData FROM IntrnlCmd WHERE CmdName = ''TimeOutCode'''

 

Stored procedure example:

SET VARIABLE RBTI_TIMEOUT TEXT = 'CALL TimeOutCode()'

 

Notes:

 

The RBTI_TIMEOUT command file must end with a RETURN command.

 

The TIMEOUT command will close ANY and ALL open forms, designers, and editors WITHOUT saving the changes which have been made since the last save. It is the responsibility of the developer and end-user to implement proper coding and/or behavior to eliminate unexpected shutdowns without saving the changes. The TIMEOUT command will disconnect from the currently opened database (if applicable) before terminating the R:BASE session.