Difference between revisions of "DBC BEFOREOPENTABLE"
Yvonne.milne (Talk | contribs) (Created page with "==Purpose== Database events are triggered by certain database operations ==See Also== ADATABASES(), ALTER TABLE, ADD TABLE, ALTER INDEX, BASE64_DECODE(),...") |
Yvonne.milne (Talk | contribs) (→Example) |
||
Line 37: | Line 37: | ||
set connstr to 'local' | set connstr to 'local' | ||
endif | endif | ||
− | userlog("End of Open Table") | + | userlog("End of Before Open Table") |
userlog("====================================") | userlog("====================================") | ||
return .t. | return .t. |
Latest revision as of 13:12, 4 March 2019
Contents
Purpose
Database events are triggered by certain database operations
See Also
ADATABASES(), ALTER TABLE, ADD TABLE, ALTER INDEX, BASE64_DECODE(), BASE64_ENCODE(), CLOSE DATABASES, CLOSE TABLES, COMPILE DATABASE, CREATE DATABASE, CREATE TABLE, CREATE INDEX, CREATE VIEW, DATABASE(), Database Events, 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 EXCLUSIVE, USE, USERLOG()
Description
The DBC_BEFOREOPENTABLE database event is triggered by an open table operation prior to opening the table.
If dbc_beforeopentable returns .F. (false) the opening of the table is cancelled.
Programs associated with database events should reside in the database's directory. These can be created and modified from the Events tab in the Data Workspace when a database is open.
The following parameters are passed to the dbc_beforeopentable program:
Parameter | Description |
---|---|
<cDatabase> | The database name |
<cTable> | The table name |
Example
// // Database: dbcdoc // Event: dbc_beforeopentable // parameters cDatabase, cTable userlog("====================================") userlog("Before Open Table in "+"dbcdoc database") userlog("Database: " +cDatabase) userlog("Table: " +cTable) if lTesting set connstr to 'local' endif userlog("End of Before Open Table") userlog("====================================") return .t.