Syntax
| 'Syntax for non-row-returning:
connectionbject.Execute CommandText[, RecordsAffected][, Options]
'Syntax for row-returning:
Set rsobject = connectionbject.Execute(CommandText[, RecordsAffected][, Options])
| ||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description
| Executes the query, SQL statement, stored procedure, or provider-specific text.
The Execute method is used to execute the specified query, SQL statement, stored procedure, or provider-specific text. If it is a row-returning query, the results (if any) will be stored in a new RecordSet object. If it is a non-row-returning query, the provider will return a closed RecordSet object.
The default cursor is forward-only and read-only. You can use the CursorType property of the RecordSet object to choose other cursors. If the requested cursor is not available, the provider may choose another cursor.
There is one mandatory parameter and two optional parameters.
CommandTypeEnum Constants
ExecuteOptionEnum Constants
| ||||||||||||||||||||||||||||||||||||||||||||||||||
See Also
| |||||||||||||||||||||||||||||||||||||||||||||||||||
Example
| strCommandText = "SELECT Code FROM Klanten"
Set objRecordset = objConnection.Execute(strCommand, ,adCmdText)
...
|