ADO Description 属性
❮ Complete Error Object Reference
Description 属性可返回一个字符串,该字符串包含对错误的描述。
这是 Error 对象的默认属性。提供者和 ADO 均可成为错误源。
提供者负责向 ADO 传递特定的错误文本。对于接收到的每一个提供者错误或警告,ADO 都会向 Errors 集合中添加一个 Error 对象。枚举 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
%>
❮ Complete Error Object Reference