خصوصية CommandType لـ ADO

التعريف والاستخدام

يمكن تعيين أو إرجاع الخاصية CommandType CommandTypeEnum مغناطيس،القيمة يمكن استخدامها لتعريف نوع Command.القيمة الافتراضية هي 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
%>