ADO Name ਪ੍ਰਤੀ
ਵਿਆਖਿਆ ਅਤੇ ਵਰਤੋਂ
Name ਪ੍ਰਤੀ ਇੱਕ ਸਟ੍ਰਿੰਗ ਸੈਟ ਕੀਤਾ ਜਾ ਸਕਦਾ ਹੈ ਜਾਂ ਪ੍ਰਾਪਤ ਕੀਤਾ ਜਾ ਸਕਦਾ ਹੈ, ਜਿਸ ਵਿੱਚ Command, Property, Field ਜਾਂ Parameter ਅਧਿਆਰਿਤ ਆਬਜੈਕਟ ਦਾ ਨਾਮ ਹੋਵੇਗਾ。
ਆਬਜੈਕਟ | Name ਪ੍ਰਤੀ ਦੇਸ਼ਬੱਧ ਹੈ |
---|---|
ਕਮਾਂਡ | Name ਪ੍ਰਤੀ ਕਮਾਂਡ ਅਧਿਆਰਿਤ ਪ੍ਰਤੀ ਲਿਖਣ ਦਾ ਅਧਿਕਾਰ ਹੈ。 |
ਪ੍ਰਾਪਰਟੀ | Name ਪ੍ਰਤੀ ਪ੍ਰਾਪਰਟੀ ਪ੍ਰਤੀ ਰੀਡ ਅਧਿਕਾਰ ਹੈ。 |
ਫੀਲਡ | ਰੈਕਾਰਡਸੈੱਟ ਬਣਾਉਣ ਵਾਲੇ ਸਮੇਂ Name ਪ੍ਰਤੀ ਲਿਖਣ ਦਾ ਅਧਿਕਾਰ ਹੈ, ਪਰ ਜਦੋਂ ਤੁਸੀਂ ਮੌਜੂਦਾ Recordset ਖੋਲ੍ਹਦੇ ਹੋ ਤਾਂ ਇਹ ਰੀਡ ਅਧਿਕਾਰ ਹੀ ਰਹਿੰਦਾ ਹੈ。 |
ਪਾਰਾਮੀਟਰ | ਪਾਰਾਮੀਟਰ ਕਲੈਕਸ਼ਨ ਵਿੱਚ ਨਾਮ ਪ੍ਰਤੀ ਅਜਿਹੇ ਪਾਰਾਮੀਟਰ ਅਧਿਆਰਿਤ ਹੈ ਜਿਸ ਦਾ Name ਪ੍ਰਤੀ ਰੀਡ/ਲਿਖਣ ਦਾ ਅਧਿਕਾਰ ਹੈ, ਪਰ ਜਦੋਂ ਤੁਸੀਂ ਮੌਜੂਦਾ Recordset ਖੋਲ੍ਹਦੇ ਹੋ ਤਾਂ ਇਹ ਰੀਡ ਅਧਿਕਾਰ ਹੀ ਰਹਿੰਦਾ ਹੈ。 |
ਸਿਫਾਰਸ਼
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") 'ਆਰਡਰਸ ਟੇਬਲ ਦੇ ਫੀਲਡ ਅਟਰੀਬਿਊਟਸ ਪ੍ਰਦਰਸ਼ਿਤ ਕਰੋ' 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") ਆਰਡਰਸ ਟੇਬਲ ਦੇ ਪ੍ਰਪਰਟੀ ਅਟਰੀਬਿਊਟਸ ਨੂੰ ਡਿਸਪਲੇਅ ਕਰੋ for each prop in rs.Properties response.write("Attr:" & prop.Attributes & "<br />") response.write("Name:" & prop.Name & "<br />") response.write("Value:" & prop.Value & "<br />") next rs.close conn.close set rs=nothing set conn=nothing %>