Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Err.Number = 0 (?)

Status
Not open for further replies.

H2

Programmer
May 17, 2001
24
0
0
HK
I have a table that colA is set to be unique.
When I add a duplicate record, this record did not insert, but the err.number is still equal to 0.
any method I can detect this error??

thanks ^^
happy.gif
 
Try checking the connection object errors collection:
<%
'if connection object is called conn
Response.Write &quot;There were &quot; & conn.errors.count & &quot; errors returned from the db.<br>&quot;
Dim dberr
For each dberr in conn.errors
Response.Write &quot;Error: &quot; & dberr.number & &quot; - &quot; & dberr.description & &quot;<br>&quot;
Next
%>

Hope this helps,

-Tarwn ________________________________________________________________________________
Want to get great answers to your Tek-Tips questions? Have a look at faq333-2924
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top