एडीओ त्रुटि वस्तु
त्रुटि वस्तु
ADO त्रुटि ऑब्जेक्ट में डेटा एक्सेस त्रुटियों के बारे में विवरण होता है जो एक एकल ऑपरेशन के दौरान उत्पन्न हुई हैं।
एडीओ प्रत्येक त्रुटि के लिए एक त्रुटि वस्तु उत्पन्न करता है। प्रत्येक त्रुटि ऑब्जेक्ट में विशिष्ट त्रुटि का विवरण होता है, और त्रुटि संग्रह में संग्रहीत किया जाता है। त्रुटियों तक पहुँचने के लिए, आपको एक विशिष्ट कनेक्शन का संदर्भ लेना होगा।
त्रुटि संग्रह के माध्यम से लूप करने के लिए:
<%
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 |