ExecuteComplete (ConnectionEvent) Method (ADO)

   

This method is called after a command has finished executing.

Syntax

ExecuteComplete RecordsAffected, pError, adStatus, pCommand, pRecordset, pConnection

Parameters

RecordsAffected   A Long. The number of records affected by the command.

pError   An Error object. It describes the error that occurred if the value of adStatus is adStatusErrorsOccurred; otherwise it is not set.

adStatus   An EventStatusEnum status value. When this method is called, this parameter is set to adStatusOK if the operation that caused the event was successful, or adStatusErrorsOccurred if the operation failed.

Before this method returns, set this parameter to adStatusUnwantedEvent to prevent subsequent notifications.

pCommand   The Command object, if any, that was executed.

pRecordset   A Recordset object. The result of the execution. This recordset may be empty.

pConnection   A Connection object. The connection on which the command was executed.

Remarks

An ExecuteComplete event may occur due to Connection.Execute, Command.Execute, Recordset.Open, or Recordset.NextRecordset.