ADO CommandType attribute

Definition and Usage

The CommandType property can be set or returned CommandTypeEnum The value defines the type of the Command object. The default is adCmdUnknown.

If you do not specify this type, ADO will need to contact the provider to determine the type of the command. If you define the type, ADO will be able to process this command faster.

Syntax

objcommand.CommandType

Example

<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "c:/webdata/northwind.mdb"
set comm=Server.CreateObject("ADODB.Command")
comm.CommandText="orders"
comm.CommandType=adCmdTable
response.write(comm.CommandType)
conn.close
%>