ADO SQLState 属性
❮ 完整错误对象参考
SQLState 属性返回一个字符串,其中包含提供程序返回的 5 个字符的 SQL 错误代码。
语法
strErrorSQL=objErr.SQLState
示例
<%
for each objErr in objConn.Errors
response.write("<p>")
response.write("描述: ")
response.write(objErr.Description & "<br>")
response.write("帮助上下文: ")
response.write(objErr.HelpContext & "<br>")
response.write("帮助文件: ")
response.write(objErr.HelpFile & "<br>")
response.write("本地错误: ")
response.write(objErr.NativeError & "<br>")
response.write("错误编号: ")
response.write(objErr.Number & "<br>")
response.write("错误源: ")
response.write(objErr.Source & "<br>")
response.write("SQL 状态: ")
response.write(objErr.SQLState & "<br>")
response.write("</p>")
next
%>
❮ 完整错误对象参考