当前位置: 首页 > 网络学院 > 服务端脚本教程 > ADO > ADO Error

ADO
ADO DataTypes
ADO 摘要
ADO 实例

ADO Error


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-01   浏览: 744 ::
收藏到网摘: n/a

Error Object
Error对象

The ADO Error object contains details about data access errors that have been generated during a single operation. 
ADO Error对象包含了错误数据的详细资料,该错误数据由执行单个的操作程序所产生的。

ADO generates one Error object for each error. Each Error object contains details of the specific error, and are stored in the Errors collection. To access the errors, you must refer to a specific connection.
ADO将为每个错误产生出一个Error[错误]对象,每个Error[错误]对象包含了具体的错误信息,并且这些错误信息被存储在Error[错误]集里。

To loop through the Errors collection:
循环显示Error[错误]集:

<%
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
%>

Syntax
语法

objErr.property

Properties
属性

Property属性 Description描述
Description Returns an error description
返回一个错误描述
HelpContext Returns the context ID of a topic in the Microsoft Windows help system
返回微软视窗帮助系统的标题ID
HelpFile Returns the full path of the help file in the Microsoft Windows help system
返回微软视窗帮助系统中帮助文件的完整路径
NativeError Returns an error code from the provider or the data source
返回技术提供对象[provider]数据源的一段错误代码
Number Returns a unique number that identifies the error
返回一个用于指示错误的独立数字
Source Returns the name of the object or application that generated the error
返回出错的对象名或应用程序名
SQLState Returns a 5-character SQL error code
返回一个“5字符”的SQL错误代码

评论 (0) All

登陆 | 还没注册?