Monday, March 2, 2026
Tip of the Day: Calling a Stored Procedure for ON CONNECT/DISCONNECT Events
Product: R:BASE 11
Build: 11.0.3.20226 or higher
Section: Commands
Keywords: ON CONNECT, ON DISCONNECT, Stored Procedure, CALL
The *ON FIRST CONNECT*, *ON AFTER CONNECT*, and *ON BEFORE DISCONNECT*
commands have been enhanced to support calling a stored procedure when
the event is triggered.
In addition, the *ON BEFORE DISCONNECT* event has been enhanced to fire
even when a user session is forcefully closed using the RBAdmin plugin.
This ensures that cleanup, logging, and auditing logic executes
consistently, even during administrative session termination.
Example:
ON BEFORE DISCONNECT CALL RunLog() SAVE
This allows centralized event logic to be maintained within stored
procedures rather than external command files, improving maintainability
and control.
*ON CONNECT/PACK Command*
The ON CONNECT/PACK command allows you to run a code logic either before
or after connecting to, or packing, a database. It supports executing:
* A command file
* Code stored in a table
* A stored procedure
*Common Use Case*
A typical use would be executing an AUTOCHK command before connecting to
a database to verify integrity. By combining this with *ABORT ON*, the
CONNECT or PACK operation can be conditionally aborted if the
pre-connect validation fails. This provides administrators with greater
control over database health and environment enforcement.
*ON DISCONNECT / ON EXIT Commands*
The ON DISCONNECT command allows execution of logic before disconnecting
from a database. The ON DISCONNECT/EXIT command extends this behavior by
allowing execution:
* After disconnecting from a database
* After closing the R:BASE session
These commands support:
* Command files
* Code stored in a table
* Stored procedures
*Common Use Cases*
Before Disconnecting
* Writing session logs
* Recording transaction summaries
* Auditing user activity
After Disconnecting / On Exit
* Reinforcing environment settings
* Writing final audit records
* Logging events within custom transaction tables
The Support Team
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 visit
https://groups.google.com/d/msgid/rbase-l/dcdb8718-99ef-5d44-0d98-30b6521ef916%40rbase.com.