Name

Connection.WillExecute Event — (Versions 2.0, 2.1, 2.5, 2.6)

Synopsis

Private Sub WillExecute(Source As String, _
                        CursorType As ADODB.CursorTypeEnum, _
                        LockType As ADODB.LockTypeEnum, _
                        Options As Long, _
                        adStatus As ADODB.EventStatusEnum, _
                        ByVal pCommand As ADODB.Command, _
                        ByVal pRecordset As ADODB.Recordset, _
                        ByVal pConnection As ADODB.Connection)

The WillExecute event is raised before an execution of a command has begun.

Arguments

Source (String)

Contains the source of the command that is to be executed. This value is usually a SQL statement or a stored procedure name.

CursorType (CursorTypeEnum)

Indicates the type of Recordset object that will be opened. This value can be changed within the event to change the type of cursor that gets used when the Recordset.Open method is called. This parameter is ignored for any other method that causes this event.

LockType (LockTypeEnum)

Indicates the locking scheme that will be used when the Recordset object is opened. This value can be changed within the event to change the locking scheme that gets used when the Recordset.Open method is called. This parameter is ignored for any other method that causes this event.

Options (Long)

Indicates any other options used to execute the command or open the recordset.

adStatus (EventStatusEnum)

Indicates the status of the current operation. The adStatus parameter is set to adStatusOK if the operation causing this event was successful. If the adStatus parameter is set to adStatusCantDeny, the event ...

Get ADO: ActiveX Data Objects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.