Share via


dbc_ModifyData Event

Occurs immediately after MODIFY DATABASE is issued. Use to prevent opening of the database designer window.

PROCEDURE dbc_ModifyData(cDatabaseName, lNoWait, lNoEdit )

-Or-

PROCEDURE dbc_ModifyData
LPARAMETERS [cDatabaseName, lNoWait, lNoEdit ]

Parameters

  • CDatabaseName
    Specifies the name of the Database being modified.
  • lNoWait
    Specifies whether the NOWAIT keyword was included in the MODIFY DATABASE command, which would cause the program execution to continue after the Database Designer is opened.
  • lNoEdit
    Specifies whether the NOEDIT keyword was included in the MODIFY DATABASE command, which would prevent editing of the database.

Remarks

You can use the dbc_ModifyData event to track access to the database when the database is modified. Return .F. from this procedure to prevent the database from being modified.

Example

PROCEDURE dbc_ModifyData ;
         (CDatabaseName, ;
            lNoWait, ;
            lNoEdit)
? '     cDatabaseName = ' + cDatabaseName + ' - ' ;
                      + TYPE('cDatabaseName ')
 ? '     lNoWait       = ' + TRANSFORM(lNoWait) + ' - ' ;
                       + TYPE('lNoWait')
 ? '     lNoEdit       = ' + TRANSFORM(lNoEdit) + ' - ' ;
                       + TYPE('lNoEdit')+' /end/ '
* Stop user from changing the database in the Designer.
IF lNoEdit
   RETURN .T.
ELSE
   RETURN .F.
ENDIF
ENDPROC

See Also

MODIFY DATABASE | Enable or Disable DBC Events | Database Designer | Modifying Database Architecture