4D v14.3

On Startup database method

Home

 
4D v14.3
On Startup database method

On Startup database method 


 

On Startup database method  
Does not require any parameters

  

The On Startup database method is called once when you open a database.

This occurs in the following 4D environments:

  • 4D in local mode
  • 4D in remote mode (on the client side, after the connection has been accepted by 4D Server)
  • 4D application compiled and merged with 4D Volume Desktop

Note: The On Startup database method is NOT invoked by 4D Server.

The On Startup database method is automatically invoked by 4D; unlike project methods, you cannot call this database method yourself by programming. You can however execute it from the Method editor. You can also use subroutines.

The On Startup database method is the perfect place to:

  • Initialize interprocess variables that you will use during the whole working session.
  • Start processes automatically when a database is opened.
  • Load Preferences or Settings saved for this purpose during the previous working session.
  • Prevent the opening of the database if a condition is not met (i.e., missing system resources) by explicitly calling QUIT 4D.
  • Perform any other actions that you want to be performed automatically each time a database is opened.

However, we strongly recommend that you do NOT launch print jobs from the On Startup database method.

Example  

See the example in the section On Exit database method.

 
PROPERTIES 

Product: 4D
Theme: Database Methods

 
HISTORY 

 
SEE ALSO 

Database Methods
Methods
On Exit database method
QUIT 4D

 
ARTICLE USAGE

4D Language Reference ( 4D v11 SQL Release 6)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v12.4)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)