Occurs before a new connection is created.
PROCEDURE dbc_BeforeCreateConnection( ) |
Remarks
You can add code in the dbc_BeforeCreateConnection event to track attempted access to the database before a connection is created, or to prevent the creation of a connection.
Return .F. from this procedure to prevent the connection from being created.
Example
Copy Code | |
|---|---|
* Reports to the screen Event name and where it is called from.
PROCEDURE dbc_BeforeCreateConnection
? '>> ' + PROGRAM()
?? ' in ' + SUBSTR(SYS(16),RAT('\',SYS(16))+1)
RETURN .F. && Prevents user from creating a connection.
ENDPROC | |
Microsoft Visual FoxPro 9 SP2 Help file, VFPX Edition v1.08