Database Events in Stored Procedures can have default code

Try running this code:

CLOSE DATABASES all

CREATE DATABASE test

MODIFY DATABASE nowait

Now choose Database->Properties (or Alt-Enter) to bring up the Database Properties dialog. This is where you can choose Database Events to fire. Try selecting a few and then hit the Edit Code button. Something like this will show in the Stored Procedures editor:

PROCEDURE dbc_Activate(cDatabaseName)

*When DBC is made current via SET DATABASE TO <dbname> or after OPEN DATABASE completes.

ENDPROC

PROCEDURE dbc_AfterAddRelation(cRelationID, cTableName, cRelatedChild, cRelatedTable, cRelatedTag)

*After relation is successfully added to the DBC.

ENDPROC

Now close the editor and discard the changes. Try hitting Shift-Click on the Edit Code button. You’ll get default behavior in the Stored Procedures:

PROCEDURE dbc_AfterAddTable(cTableName, cLongTableName)

*After table is successfully added to the DBC.

      Activate Screen

      ?Program(),cTableName, cLongTableName

ENDPROC

PROCEDURE dbc_AfterAppendProc(cFileName, nCodePage, lOverWrite)

*After the APPEND PROC operation completed.

      Activate Screen

      ?Program(),cFileName, nCodePage, lOverWrite

ENDPROC