Condividi tramite


dbc_BeforeDBGetProp Event

Occurs before the DBGetProp( ) function runs.

PROCEDURE dbc_BeforeDBGetProp(cName, cType, cProperty) 

-or-

PROCEDURE dbc_BeforeDBGetProp
LPARAMETERS cName, cType, cProperty

Parameters

  • cName
    Specifies the value of the first parameter in the DBGetProp( ) function, the name of the database, field, named connection, table, or view for which DBGETPROP( ) returns information.
  • cType
    Specifies the value of the second parameter in the DBGetProp( ) function, the object type of the item named in cName.
  • cProperty
    Specifies the value of the third parameter in the DBGetProp( ) function, the property for which DBGETPROP( ) returns information.

Remarks

You can use the dbc_BeforeDBGetProp event to track attempted access to the database before DBGetProp( ) runs.

Return .F. from this procedure to prevent the property value from being returned to DBGetProp(). This will cause the DBGetProp() function to return NULL.

Example

* Reports to the screen Event name, where it is called from and ;
* the parameter passed.
PROCEDURE dbc_BeforeDBGetProp ;
         (cName,;
          cType,;
          cProperty)
 ? '>>   ' + PROGRAM()
 ?? ' in ' + SUBSTR(SYS(16),RAT('\',SYS(16))+1)
 ? '     Current DBC: ' + SUBSTR(DBC(),RAT('\',DBC())+1)
 ? '     cName     =  ' + TRANSFORM(cName)     + ' - ' + TYPE('cName')
 ? '     cType     =  ' + TRANSFORM(cType)     + ' - ' + TYPE('cType')
 ? '     cProperty =  ' + TRANSFORM(cProperty) + ' - ' + TYPE('cProperty')+' /end/ '
ENDPROC

See Also

Enable or Disable DBC Events | dbc_AfterDBGetProp Event | DBGETPROP( )