Latest web development tutorials

ADO Command object


Command objects

ADO Command object to execute a simple query for the database. The query can perform, such as create, add, retrieve, update, or delete records and other activities.

If the query is used to retrieve the data, this data will be a RecordSet object returned. It can be RecordSet object's properties which means that the retrieved data, collections, methods, or events to operate.

Key Features Command object is the ability to use stored queries and stored procedures with parameters.

ProgID

set objCommand = Server.CreateObject ( "ADODB.command")

Attributes

Attributes description
ActiveConnection Sets or returns a Connection object or connection definition string.
CommandText Sets or returns a provider (provider) command (such as SOL statement, table name, or stored procedure call) string value. The default value is "" (zero-length string).
CommandTimeout Sets or returns a long integer value that indicates the command execution waiting time (in seconds). The default value is 30.
CommandType Sets or returns a Command object's type
Name Sets or returns a Command object name
Prepared Whether to save the compiled version of directive command execution (version has been prepared).
State It returns a value that can be described as the Command object is open, closed, connection, perform or retrieve data state.

method

method description
Cancel Once canceled a method of execution.
CreateParameter Create a new Parameter object
Execute CommandText property query execution, SQL statements or stored procedures.

set

set description
Parameters All Parameter object contains a Command object.
Properties All Property object contains a Command object.