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, _ ByValpCommand
As ADODB.Command, _ ByValpRecordset
As ADODB.Recordset, _ ByValpConnection
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 toadStatusOK
if the operation causing this event was successful. If theadStatus
parameter is set toadStatusCantDeny
, 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.