Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
You can enable Database Container (DBC) events and add code to specific events on data contained in a database. You can create this code manually in an external file, or you can use the Database Properties dialog box, which provides a template for you to complete in the location you specify. The following table describes the available DBC events:
DBC Events | Description |
---|---|
DBC_Activate | Occurs when an open database becomes current. |
DBC_Deactivate | Occurs when a database ceases to be current. |
DBC_BeforeAddRelation | Occurs before a relation is added to the database. |
DBC_AfterAddRelation | Occurs after a relation is added to the database successfully. |
DBC_BeforeAddTable | Occurs before a table is added to an open database. |
DBC_AfterAddTable | Occurs after a table is added to an open database. |
DBC_BeforeAppendProc | Occurs before the append operation in the current DBC stored procedure completes. Use to prevent the append operation. Also, use to discover the name of the DBC involved. |
DBC_AfterAppendProc | Occurs after the APPEND PROC operation completes. |
DBC_BeforeCloseTable | Occurs before the table or view is closed. |
DBC_AfterCloseTable | Occurs after a table or view is closed. |
DBC_BeforeCopyProc | Occurs before the copy procedure operation in the current DBC begins. Use to prevent the operation. Also, use to discover the name of the DBC involved. |
DBC_AfterCopyProc | Occurs after the copy procedure operation in the current DBC completes. Use to discover the name of the DBC involved. |
DBC_BeforeCreateConnection | Occurs before a connection is created. Use to prevent connection creation or connection designer opening. |
DBC_AfterCreateConnection | Occurs after a connection is created. |
DBC_BeforeCreateOffline | Occurs before a view is taken offline. Use to prevent offline view. |
DBC_AfterCreateOffline | Occurs after CREATEOFFLINE( ) has completed. |
DBC_BeforeCreateTable | Occurs before a table is created in an open database. |
DBC_AfterCreateTable | Occurs after a table is created in an open database. |
DBC_BeforeCreateView | Occurs before a view is created. Use to prevent view from being created or view designer from being opened. |
DBC_AfterCreateView | Occurs after view creation is completed. |
DBC_BeforeDBGetProp | Occurs before DBGetProp( ) runs. |
DBC_AfterDBGetProp | Occurs after DBGetProp( ) completes. |
DBC_BeforeDBSetProp | Occurs before DBSetProp( ) runs. Event also fires when "Event" property is changed. |
DBC_AfterDBSetProp | Occurs after DBSetProp( ) completes. Event also fires when "Event" property is changed. |
DBC_BeforeDeleteConnection | Occurs before a connection is dropped. |
DBC_AfterDeleteConnection | Occurs after a connection is dropped. |
DBC_BeforeDropOffline | Occurs before a view is returned to online. Use to prevent bringing offline view back online. |
DBC_AfterDropOffline | Occurs after DROPOFFLINE( ) has completed. |
DBC_BeforeDropRelation | Occurs before a relation is dropped from a database. |
DBC_AfterDropRelation | Occurs after a relation is dropped from a database successfully. |
DBC_BeforeDropTable | Occurs before the table is removed from the DBC and deleted from disk. |
DBC_AfterDropTable | Occurs after a table is removed from the DBC and deleted from disk. |
DBC_BeforeDropView | Occurs before a view is removed from the DBC. Use to prevent view from being dropped. |
DBC_AfterDropView | Occurs after view is removed from the DBC. |
DBC_BeforeModifyConnection | Occurs before a connection is modified. |
DBC_AfterModifyConnection | Occurs after a connection is modified. |
DBC_BeforeModifyProc | Occurs before the DBC-stored procedure in an open DBC is modified. Use to prevent modification. Also, use to discover the name of the current DBC. |
DBC_AfterModifyProc | Occurs after modifications have been made and the stored procedure file for the DBC has been closed. |
DBC_BeforeModifyTable | Occurs before a table is modified. |
DBC_AfterModifyTable | Occurs after a table is modified. |
DBC_BeforeModifyView | Occurs before a view is modified. |
DBC_AfterModifyView | Occurs after a view is modified. |
DBC_BeforeOpenTable | Occurs before a table or view is opened. |
DBC_AfterOpenTable | Occurs after a table or view is opened. |
DBC_BeforeRemoveTable | Occurs before a table is removed from the DBC. |
DBC_AfterRemoveTable | Occurs after table removal is complete. |
DBC_BeforeRenameConnection | Occurs before a connection is renamed. |
DBC_AfterRenameConnection | Occurs after a connection is renamed. |
DBC_BeforeRenameTable | Occurs before a table is renamed. |
DBC_AfterRenameTable | Occurs after a table is renamed. |
DBC_BeforeRenameView | Occurs before a view is renamed. |
DBC_AfterRenameView | Occurs after a view is renamed. |
DBC_BeforeValidateData | Occurs before VALIDATE DATABASE executes. Return .F. to prevent the DBC from being validated. |
DBC_AfterValidateData | Occurs after VALIDATE DATABASE completes. |
DBC_ModifyData | Occurs immediately after Modify Data is issued. Use to prevent opening of Schema window. Also, can open a closed database. |
DBC_OpenData | Occurs when a database opens or when a MODIFY DATABASE command is issued against a closed database. Use to close an open database. |
DBC_CloseData | Closes an open database. |
DBC_PackData | Occurs before PACK DATABASE executes. Use to prevent the DBC from being packed. |
See Also
Enabling or Disabling DBC Events | Adding Code to a DBC Event