ADO Command Object


Bevelvoorwerp

Die ADO Command-objek word gebruik om 'n enkele navraag teen 'n databasis uit te voer. Die navraag kan aksies uitvoer soos die skep, byvoeging, herwinning, uitvee of opdatering van rekords.

As die navraag gebruik word om data te herwin, sal die data as 'n RecordSet-objek teruggestuur word. Dit beteken dat die opgespoorde data gemanipuleer kan word deur eienskappe, versamelings, metodes en gebeure van die Recordset-objek.

Die belangrikste kenmerk van die Command-objek is die vermoë om gestoorde navrae en prosedures met parameters te gebruik.


ProgID

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

Eienskappe

Property Description
ActiveConnection Sets or returns a definition for a connection if the connection is closed, or the current Connection object if the connection is open
CommandText Sets or returns a provider command
CommandTimeout Sets or returns the number of seconds to wait while attempting to execute a command
CommandType Sets or returns the type of a Command object
Name Sets or returns the name of a Command object
Prepared Sets or returns a Boolean value that, if set to True, indicates that the command should save a prepared version of the query before the first execution
State Returns a value that describes if the Command object is open, closed, connecting, executing or retrieving data

Metodes

Method Description
Cancel Cancels an execution of a method
CreateParameter Creates a new Parameter object
Execute Executes the query, SQL statement or procedure in the CommandText property

Versamelings

Collection Description
Parameters Contains all the Parameter objects of a Command Object
Properties Contains all the Property objects of a Command Object