version 11.2 (Modified)
Database methods are methods that are automatically executed by 4D when a general session event occurs.
To create or open and edit a database method:
1. Open the Explorer window.
2. Select the Methods page.
3. Expand the Database Methods theme.
4. Double click on the method.
or:
1. Select the method.
2. Press Enter or Return.
You edit a database method in the same way as any other method.
You cannot call a database method from another method. Database methods are automatically invoked by 4D at certain points in a working session. The following table summarizes execution of database methods:
Database Method | 4D local | 4D Server | 4D remote |
On Startup | Yes, Once | No | Yes, Once |
On Exit | Yes, Once | No | Yes, Once |
On Drop | Yes, Multiple | No | Yes, Multiple |
On Web Connection | Yes, Multiple | Yes, Multiple | Yes, Multiple |
On Web Authentication | Yes, Multiple | Yes, Multiple | Yes, Multiple |
On Backup Startup | Yes, Multiple | Yes, Multiple | Yes, Multiple |
On Backup Shutdown | Yes, Multiple | Yes, Multiple | Yes, Multiple |
On Server Startup | No | Yes, Once | No |
On Server Shutdown | No | Yes, Once | No |
On Server Open Connection | No | Yes, Multiple | No |
On Server Close Connection | No | Yes, Multiple | No |
On SQL Authentication | Yes, Multiple | Yes, Multiple | Yes, Multiple |
For detailed information about each of the database methods, see the following sections:
On Web Connection Database Method
On Web Authentication Database Method
On Backup Startup Database Method
On Backup Shutdown Database Method
On SQL Authentication Database Method
On Server Startup Database Method (4D Server Reference manual)
On Server Shutdown Database Method (4D Server Reference manual)
On Server Open Connection Database Method (4D Server Reference manual)
On Server Close Connection Database Method (4D Server Reference manual)