ADO SQLState 属性

定义和用法

SQLState 属性可返回一个字符串,该字符串包含由提供者返回的五个字符的 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("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>")
ਅਗਲਾ
%>