ویژگی SQLState ADO

تعریف و استفاده

ویژگی SQLState می‌تواند یک رشته از پنج حرف کد خطای SQL را که توسط ارائه‌دهنده بازگردانده شده است، بازگرداند.

نحوه استفاده

strErrorSQL=objErr.SQLState

مثال

<%
برای هر objErr در Errors objConn
  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>")
بعدی
%>