ADO CommandType Property
❮ Command Object ရည်ညွှန်းချက်ကို အပြီးသတ်ပါ။
CommandType ပိုင်ဆိုင်မှုသည် Command object အမျိုးအစားကို သတ်မှတ်ပေးသော CommandTypeEnum တန်ဖိုးကို သတ်မှတ်ပေးသည် သို့မဟုတ် ပြန်ပေးသည်။ မူရင်းမှာ adCmdUnknown ဖြစ်သည်။
အမျိုးအစားကို မသတ်မှတ်ပါက၊ ADO သည် အမိန့်အမျိုးအစားကို ဆုံးဖြတ်ရန် ဝန်ဆောင်မှုပေးသူကို ဆက်သွယ်ရန် လိုအပ်မည်ဖြစ်သည်။ သို့သော်၊ သင်သည်အမျိုးအစားကိုသတ်မှတ်ပါက၊ ADO သည် command ကိုပိုမိုမြန်ဆန်စွာလုပ်ဆောင်နိုင်လိမ့်မည်။
အထားအသို
objcommand.CommandType
ဥပမာ
<%
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
%>
CommandTypeEnum တန်ဖိုးများ
Constant | Value | Description |
---|---|---|
adCmdUnspecified | -1 | Does not specify the command type argument. |
adCmdText | 1 | Evaluates CommandText as a textual definition of a command or stored procedure call. |
adCmdTable | 2 | Evaluates CommandText as a table name whose columns are all returned by an internally generated SQL query. |
adCmdStoredProc | 4 | Evaluates CommandText as a stored procedure name. |
adCmdUnknown | 8 | Default. Indicates that the type of command in the CommandText property is not known. |
adCmdFile | 256 | Evaluates CommandText as the file name of a persistently stored Recordset. Used with Recordset.Open or Requery only. |
adCmdTableDirect | 512 | Evaluates CommandText as a table name whose columns are all returned. Used with Recordset.Open or Requery only. To use the Seek method, the Recordset must be opened with adCmdTableDirect. This value cannot be combined with the ExecuteOptionEnum value adAsyncExecute. |
❮ Command Object ရည်ညွှန်းချက်ကို အပြီးသတ်ပါ။