คุณสมบัติ Description ของ ADO

การกำหนดและการใช้งาน

คุณสมบัติ Description สามารถกลับค่าแบบข้อความที่เกี่ยวข้องกับข้อผิดพลาด

นี่คือคุณสมบัติปริยายของ Object Error ผู้ให้บริการและ ADO ก็สามารถเป็นแหล่งข้อมูลข้อผิดพลาด

ผู้ให้บริการเป็นผู้รับผิดชอบในการส่งข้อความข้อผิดพลาดเฉพาะเจาะจงถึง ADO สำหรับทุกข้อผิดพลาดหรือคำเตือนที่ได้รับจากผู้ให้บริการ ADO จะเพิ่มเป็น Error Object ในชุด Errors ในการเลือกชุด Errors ตามข้อผิดพลาดที่ผู้ให้บริการส่งมา

ภาษาบอร์เดิร์

strErrorText=objErr.Description

ตัวอย่าง

<%
for each objErr in objConn.Errors
  response.write("<p>")
  response.write("Description: ")
  response.write(objErr.Description & "<br />")
  response.write("Help context: ")
  response.write(objErr.HelpContext & "<br />")
  response.write("Help file: ")
  response.write(objErr.HelpFile & "<br />")
  response.write("Native error: ")
  response.write(objErr.NativeError & "<br />")
  response.write("Error number: ")
  response.write(objErr.Number & "<br />")
  response.write("Error source: ")
  response.write(objErr.Source & "<br />")
  response.write("SQL state: ")
  response.write(objErr.SQLState & "<br />")
  response.write("</p>")
next
%>