Difference between revisions of "Database Events"
Yvonne.milne (Talk | contribs) |
Yvonne.milne (Talk | contribs) (→Description) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
==See Also== | ==See Also== | ||
− | [[ADATABASES()]], [[ALTER TABLE]], [[ADD TABLE]], [[ALTER INDEX]], [[CLOSE DATABASES]], [[CLOSE TABLES]], [[COMPILE DATABASE]], [[CREATE DATABASE]], [[CREATE TABLE]], [[CREATE INDEX]], [[CREATE VIEW]], [[DATABASE()]], [[DBUSED()]], [[DISPLAY DATABASE]], [[DISPLAY INDEXES]], [[DISPLAY TABLES]], [[DROP DATABASE]], [[DROP INDEX]], [[DROP TABLE]], [[GETENV()]], [[LIST DATABASE]], [[LIST INDEXES]], [[LIST TABLES]], [[OPEN DATABASE]], [[PACK DATABASE]], [[REBUILD DATABASE]], [[REINDEX DATABASE]], [[SET AUTOCATALOG]], [[SET DBCEVENTS]], [[SET EXCLUSIVE]], [[SQL USE|USE]] | + | [[ADATABASES()]], [[ALTER TABLE]], [[ADD TABLE]], [[ALTER INDEX]], [[CLOSE DATABASES]], [[CLOSE TABLES]], [[COMPILE DATABASE]], [[CREATE DATABASE]], [[CREATE TABLE]], [[CREATE INDEX]], [[CREATE VIEW]], [[DATABASE()]], [[DBUSED()]], [[DISPLAY DATABASE]], [[DISPLAY INDEXES]], [[DISPLAY TABLES]], [[DROP DATABASE]], [[DROP INDEX]], [[DROP TABLE]], [[Event Delegate Sequences]], [[GETENV()]], [[LIST DATABASE]], [[LIST INDEXES]], [[LIST TABLES]], [[OPEN DATABASE]], [[PACK DATABASE]], [[REBUILD DATABASE]], [[REINDEX DATABASE]], [[SET AUTOCATALOG]], [[SET DBCEVENTS]], [[SET EXCLUSIVE]], [[SQL Constraints]], [[SQL USE|USE]] |
==Description== | ==Description== | ||
Line 14: | Line 14: | ||
|- | |- | ||
|[[DBC_AFTERINSERT]]||Occurs after an insert operation | |[[DBC_AFTERINSERT]]||Occurs after an insert operation | ||
+ | |- | ||
+ | |[[DBC_AFTEROPENDATA]]||Occurs on an open database operation after the database has been opened (from v6.3) | ||
+ | |- | ||
+ | |[[DBC_AFTEROPENTABLE]]||Occurs on an open table operation after the table has been opened (from v5.0) | ||
|- | |- | ||
|[[DBC_AFTERUPDATE]]||Occurs after an update operation | |[[DBC_AFTERUPDATE]]||Occurs after an update operation | ||
Line 20: | Line 24: | ||
|- | |- | ||
|[[DBC_BEFOREINSERT]]||Occurs before an insert operation | |[[DBC_BEFOREINSERT]]||Occurs before an insert operation | ||
+ | |- | ||
+ | |[[DBC_BEFOREOPENTABLE]]||Occurs on an open table operation before the table has been opened (from v5.0) | ||
|- | |- | ||
|[[DBC_BEFOREUPDATE]]||Occurs before an update operation | |[[DBC_BEFOREUPDATE]]||Occurs before an update operation | ||
|- | |- | ||
− | |[[DBC_CLOSEDATA]]||Occurs when | + | |[[DBC_CLOSEDATA]]||Occurs when a database is closed |
|- | |- | ||
|[[DBC_OPENDATA]]||Occurs when a database is opened | |[[DBC_OPENDATA]]||Occurs when a database is opened | ||
Line 44: | Line 50: | ||
[[Category:SQL|Database Events]] | [[Category:SQL|Database Events]] | ||
[[Category:Databases]] | [[Category:Databases]] | ||
+ | [[Category:Database Triggers]] |
Latest revision as of 07:06, 23 November 2021
Purpose
Database events are triggered by certain database operations
See Also
ADATABASES(), ALTER TABLE, ADD TABLE, ALTER INDEX, CLOSE DATABASES, CLOSE TABLES, COMPILE DATABASE, CREATE DATABASE, CREATE TABLE, CREATE INDEX, CREATE VIEW, DATABASE(), DBUSED(), DISPLAY DATABASE, DISPLAY INDEXES, DISPLAY TABLES, DROP DATABASE, DROP INDEX, DROP TABLE, Event Delegate Sequences, GETENV(), LIST DATABASE, LIST INDEXES, LIST TABLES, OPEN DATABASE, PACK DATABASE, REBUILD DATABASE, REINDEX DATABASE, SET AUTOCATALOG, SET DBCEVENTS, SET EXCLUSIVE, SQL Constraints, USE
Description
Database events are triggered by certain database operations. They can have code associated with them that is run automatically when the event occurs.
Event | Description |
---|---|
DBC_AFTERDELETE | Occurs after a delete operation |
DBC_AFTERINSERT | Occurs after an insert operation |
DBC_AFTEROPENDATA | Occurs on an open database operation after the database has been opened (from v6.3) |
DBC_AFTEROPENTABLE | Occurs on an open table operation after the table has been opened (from v5.0) |
DBC_AFTERUPDATE | Occurs after an update operation |
DBC_BEFOREDELETE | Occurs before a delete operation |
DBC_BEFOREINSERT | Occurs before an insert operation |
DBC_BEFOREOPENTABLE | Occurs on an open table operation before the table has been opened (from v5.0) |
DBC_BEFOREUPDATE | Occurs before an update operation |
DBC_CLOSEDATA | Occurs when a database is closed |
DBC_OPENDATA | Occurs when a database is opened |
When a database is opened, if dbc_library.prg (.dbo compiled/runtime) procedure library file exists, it is loaded as a system library.
Programs associated with database events should reside in the relevant database's directory.
These can be created and modified from the Events tab in the Data Workspace when a database is open.