ADO 오류 개체
오류 개체
ADO Error 개체에는 단일 작업 중에 생성된 데이터 액세스 오류에 대한 세부 정보가 포함되어 있습니다.
ADO는 각 오류에 대해 하나의 Error 개체를 생성합니다. 각 Error 개체에는 특정 오류에 대한 세부 정보가 포함되어 있으며 Errors 컬렉션에 저장됩니다. 오류에 액세스하려면 특정 연결을 참조해야 합니다.
Errors 컬렉션을 반복하려면:
<%
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
%>
통사론
objErr.property
속성
Property | Description |
---|---|
Description | Returns an error description |
HelpContext | Returns the context ID of a topic in the Microsoft Windows help system |
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 |
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 |