ADO NativeError 属性

定义和用法

NativeError 属性可返回一个 long 值,该值是由提供者或数据源返回 ADO 的错误代码。

使用 NativeError 属性对某个 Error 对象检索数据库特有的错误信息。例如,当配合使用 Microsoft ODBC Provider for OLE DB 和 Microsoft SQL Server 数据库时,从 SQL Server 产生的原生错误代码将通过 ODBC 和 ODBC Provider 传递到 ADO NativeError 属性。

语法

lngErrorNative=objErr.NativeError

实例

<%
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
%>
系统帮助 | 给我留言 | 收藏本站
Copyright © 2005-2008 www.cnn84.com All Rights Reserved Ver:2.0
CNN84网是公益性便民网站,是为了给大家的日常生活查询及提供最快捷的出行指南