ADO အမည် အား
အသုံးပြုခြင်း နှင့် ပုံစံ
အမည် အား သုံးစွဲနိုင်သည် သို့မဟုတ် ပြန်လည်ပေးနိုင်သည်။ အမည် အား သတင်းပိုင်း၊ သတင်းပိုင်း အား သာသုံးစွဲနိုင်သည်。
အရာ | အမည် အား အထင်မှား |
---|---|
Command | အမည် အား သတင်းပိုင်း အား အသုံးပြုနိုင်သည်。 |
Property | အမည် အား သတင်းပိုင်း အား သာသုံးစွဲနိုင်သည်。 |
Field | အမည် အား သတင်းပိုင်း အတွက် အသုံးပြုခြင်းအတွက် သုံးစွဲနိုင်သည်။ သတင်းပိုင်း အမြဲတမ်း အသုံးပြုခြင်းအတွက် အမည် အား သာသုံးစွဲနိုင်သည်。 |
Parameter | Parameters စုအတွက် မဟုတ်ဘဲ သတင်းပိုင်းအား အမည် ကို တင်သွင်းခြင်းအတွက် သုံးစွဲနိုင်သည်။ အမည် အား တင်သွင်းပြီးနောက် သတင်းပိုင်းအား နှင့် အခြား အားလုံး အတွက် အမည် အား သာသုံးစွဲနိုင်သည်။ အမည် အား စုအတွက် မပါဘဲဖြစ်နိုင်သည်。 |
လိုင်းဘာသာ
object.Name
သုံးစွဲခြင်း
သတင်းပိုင်း အားလုံးအတွက်:
<% 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.Name="xx" response.write(comm.Name) conn.close %>
သတင်းပိုင်း အားလုံးအတွက်:
<% set conn=Server.CreateObject("ADODB.Connection") conn.Provider="Microsoft.Jet.OLEDB.4.0" conn.Open "c:/webdata/northwind.mdb" set rs = Server.CreateObject("ADODB.Recordset") rs.open "Select * from orders", conn set f=Server.CreateObject("ADODB.Field") ‘Orders အချက်အလက် အား ပြသပါ’ for each f in rs.Fields response.write("Attr:" & f.Attributes & "<br />") response.write("Name:" & f.Name & "<br />") response.write("Value:" & f.Value & "<br />") next rs.Close conn.close set rs=nothing set conn=nothing %>
သတင်းပိုင်း အားလုံးအတွက်:
<% set conn=Server.CreateObject("ADODB.Connection") conn.Provider="Microsoft.Jet.OLEDB.4.0" conn.Open "c:/webdata/northwind.mdb" set rs = Server.CreateObject("ADODB.Recordset") rs.open "Select * from orders", conn set prop=Server.CreateObject("ADODB.Property") 'Display the property attributes of the Orders Table for each prop in rs.Properties response.write("Attr:" & prop.Attributes & "
") response.write("Name:" & prop.Name & "
") response.write("Value:" & prop.Value & "
") next rs.close conn.close set rs=nothing set conn=nothing %>