Property Precision ของ ADO
คำอธิบายและวิธีใช้
Property Precision สามารถตั้งค่าหรือคืนค่าค่า byte ที่เป็นจำนวนที่อนุญาตให้ใช้เป็นตัวเลขสูงสุดใน Parameter หรือ Object Field
รูปแบบการใช้งาน
objectname.Precision
Object | คำอธิบายความหมายของความละเอียด (Precision) ของ Property |
---|---|
Field |
สำหรับ Object ของ Field ความละเอียด (Precision) ทั่วไปเป็นค่าอ่านเฉพาะ แต่สำหรับ Field ใหม่ที่เพิ่มเข้า Record ในชุด Fields ความละเอียดจะเป็นอ่าน/เขียนเมื่อมีการกำหนดค่า Value ของ Field และ Data Provider สามารถเพิ่ม Field ใหม่ด้วยการเรียกเมธอด Update ของชุด Fields สำเร็จ |
Parameter | สำหรับตัวแปร Parameter ทรัพยากร Precision มีสิทธิ์เข้าออก |
ตัวอย่าง
<% 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 response.write(rs.Fields(0).Precision) rs.Close conn.close %>