ON CONNECT/PACK
Top  Previous  Next

Use the ON CONNECT/PACK command to run a command file before or after connecting to or packing a database.

onbefore

Options

BEFORE
Indicates the command file should be run before the CONNECT/PACK.

CONNECT

Indicates the command file should be run when connecting a database.

FIRST

Indicates the command file should be run on the first connect only.

PACK

Indicates the command file should be run when packing a database.

RESET

Clears out the ON CONNECT/PACK command recorded in the database.

cmdfile

Specifies the name of the command file to execute.

SAVE

Specifies that the parameters in the cmdfile or from the RESET will be saved to the database. Any options without the SAVE parameters will only be active for a session.


About the ON CONNECT/PACK command

The ON CONNECT/PACK command is useful for running a specific command file whenever a database is connected or packed. A common use would be to run a command file that does an AUTOCHK command before connecting. The ABORT ON command could then be used to cause the CONNECT/PACK to be aborted after the command file finishes.