Share via


dbc_BeforeCreateConnection Event

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

* 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

See Also

Enable or Disable DBC Events | dbc_AfterCreateConnection Event