Friday, August 16, 2024

Tip of the Day: Using TIMEOUT without an External File
Product.......: R:BASE 11
Build.........: 11.0.1.40815 or higher
Section.......: Settings
Keywords......: TIMEOUT, RBTI_TIMEOUT, Stored Procedure, RUN SELECT

Did you know that you can perform a TIMEOUT for session inactivity and use a stored procedure or RUN SELECT to call a closing routine?

The RBTI_TIMEOUT variable functionality was enhanced to execute a routine as a RUN SELECT or CALL to a stored procedure when a TIMEOUT occurs, in addition to launching a command file.

The TIMEOUT setting may close an inactive R:BASE session and exit the operating system after a set amount of time passes. If a TIMEOUT is set, a countdown is always running. The countdown will reset when keyboard or mouse activity is detected or if commands are running where table rows are being processed. The default for TIMEOUT is 0 (zero), which does not activate a countdown. TIMEOUT is set in minutes, and all workstations must set TIMEOUT separately.

When a TIMEOUT occurs, a routine in the form of a command file, RUN SELECT, or CALL to a stored procedure can be executed with the 
RBTI_TIMEOUT variable definition. 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.

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 made since the last save. The developer and end-user are responsible for implementing 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.

Examples:

The following will close R:BASE after the workstation is inactive for one hour:

SET TIMEOUT 60

The following will run the CleanUp.rmd command file after the TIMEOUT occurs:

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

The following will run the table stored code after the TIMEOUT occurs:

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

The following will run the TimeOutCode stored procedure after the TIMEOUT occurs:

SET VARIABLE RBTI_TIMEOUT TEXT = 'CALL TimeOutCode()'

The 
RBTI_TIMEOUT options provide further useful features for running a routine after automatically disconnecting idle R:BASE sessions.

Very Best R:egards,

Razzak.

R:BASE Technologies, Inc.
https://www.rbase.com

--
For group guidelines, visit http://www.rbase.com/support/usersgroup_guidelines.php
---
You received this message because you are subscribed to the Google Groups "RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/rbase-l/1031394741.4355507.1723821847542%40email.ionos.com.

Reply via email to