ADO State အချက်အလက်

ဒီနေရာတွင် အသုံးပြုခြင်း နှင့် အသုံးချက်

State အချက်အလက် သည် အရာဝတ္တု၏ တစ်ခါတစ်ရံ ဖွင့်ထားခြင်း၊ ပိတ်ထားခြင်း၊ ခင်းသို့ လိုက်လျောမှု၊ လုပ်ဆောင်မှု၊ သုတေသန ရပ်စဲမှု ဖြစ်နေသေးသည်ကို ဖော်ပြသော ပမာဏကို ပြန်လည်ပေးသည်။ ပြန်လည်ပေးသော ပမာဏ ObjectStateEnum ပမာဏ။ မြန်မာပြည် မှာ မူဆိုချက်အားလုံး adStateClosed ဖြစ်သည်。

ထိုအချက်အလက်သည် အမည်အားလုံး Command, Connection, Record, Recordset နှင့် Stream အိုက်အေအဖွဲ့များတွင် အသုံးပြုနိုင်သည်。

State 属性可以是值的组合。例如,如果正在执行某个语句,此属性将有一个 adStateOpen 和 adStateExecuting 的组合值。

State 属性为只读。

语法

object.State

实例

针对 Command 对象:

<%
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")
response.write(comm.State)
conn.close
%>

针对 Connection 对象:

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