ch11lev1sec6

   

Using Component Events

The ADO components offer a variety of events that are specific to their operation. They also support the standard events used by other TDataSet descendant components, such as AfterPost . Most of the ADO specific events have names that are self-explanatory.

TADOConnection Events

  • OnWillConnect() Notifies the application that the connection has been accepted, but not yet made.

  • OnConnectComplete() Notifies the application that the connection has been completed.

  • OnInfoMessage() Notifies the application that the provider is offering an informational message; this should occur right after the connection is made.

  • OnBeginTransComplete() Notifies the application that the transaction has begun.

  • OnCommitTransComplete() Notifies the application that the commit has completed.

  • OnRollbackTransComplete() Notifies the application that the rollback has completed.

  • OnWillExecute() Notifies the application that the command will be executed, but has not yet started to execute. Note that this is fired for any components that use the connection, as opposed to the same event on the individual component, which only fires when that component is asked to execute a command. Because TADOCommand offers no events, this is the only way to handle a TADOCommand execution- related event.

  • OnExecuteComplete() Notifies the application that the command execution is complete.

  • OnDisconnect() Notifies the application that the connection has been closed.

TADOCommand Events

TADOCommand does not have any events.

TADOCustomDataSet Descendant Events

  • OnEndOfRecordset() Notifies the application that the end of the recordset (in other words, EOF) has been reached.

  • OnFetchComplete() Notifies the application when an asynchronously executed SQL command has completed the production of a recordset.

  • OnFetchProgress() Periodically notifies the application of the progress of an asynchronously executed SQL command.

  • OnFieldChangeComplete() Notifies the application that a change to the underlying database field (not the VCL TField descendant) has completed.

  • OnMoveComplete() Fires when the database cursor movement has completed (similar to the TDataSource OnDataChange() event).

  • OnRecordChangeComplete() Notifies the application that the record change has been completed. This is separate from the completion of changes to the recordset.

  • OnRecordsetChangeComplete() Notifies the application that the recordset change is complete.

  • OnWillChangeField() Notifies the application that ADO is prepared to perform a field change, but the change has not yet occurred.

  • OnWillChangeRecord() Notifies the application that ADO is prepared to perform a record change, but the change has not yet occurred.

  • OnWillChangeRecordset() Notifies the application that ADO is prepared to perform a recordset change, but the change has not yet occurred.

  • OnWillMove() Notifies the application that ADO is prepared to move the cursor, but the change has not yet occurred.


   
Top


C++ Builder Developers Guide
C++Builder 5 Developers Guide
ISBN: 0672319721
EAN: 2147483647
Year: 2002
Pages: 253

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net