Name
Connection.WillExecute Event — (Versions 2.0, 2.1, 2.5, 2.6)
Synopsis
Private Sub WillExecute(SourceAs String, _CursorTypeAs ADODB.CursorTypeEnum, _LockTypeAs ADODB.LockTypeEnum, _OptionsAs Long, _adStatusAs ADODB.EventStatusEnum, _ ByValpCommandAs ADODB.Command, _ ByValpRecordsetAs ADODB.Recordset, _ ByValpConnectionAs 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
adStatusparameter is set toadStatusOKif the operation causing this event was successful. If theadStatusparameter is set toadStatusCantDeny, the event ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access