Databases Reference
In-Depth Information
Set rs = ConnectionObject.Execute( CommandText , RecordsAffected ,
Options )
We will see several examples of the use of the Execute method.
RecordsAffected is a Long parameter that we must supply. ADO will fill this
variable with the number of records that are affected by the command. The
optional Options parameter can assume a variety of values indicating how the
data provider should interpret the CommandText argument. The possible values
are:
adCmdText
CommandText is a textual definition of a command.
adCmdTable
CommandText is a table name. The rows of this table should be returned by an
SQL query created internally by ADO.
adCmdTableDirect
CommandText is a table name. The provider should return all rows from this table.
adCmdStoredProc
CommandText is the name of a stored procedure.
adCmdUnknown
The type of command in the CommandText argument is not known.
adAsyncExecute
The command should execute asynchronously. (This means that the command
will execute and then fire the ExecuteComplete event to signal that it has
completed.)
adAsyncFetch
The remaining rows after the initial quantity specified in the CacheSize property
should be fetched asynchronously.
Open
Opens a connection; that is, it creates an actual connection to the data provider. Its
syntax is:
connection.Open ConnectionString, UserID, Password, Options
Search WWH ::




Custom Search