By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,209 Members | 1,092 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,209 IT Pros & Developers. It's quick & easy.

error handling in asp-userfrindly messages

P: n/a
hi ...

I want to do error handling in my application. I have made a complete
application. but when I encounter errors (like mentioned below) I want to do
error handling. how can I do it?

I mean like in this case I can see if the record is being added duplicate
then I can always check for duplicate records and throw a message. but I
will face so many errors like this??? do we have a list ..whereby I can get
all the error numbers and there meanings and I generate my own user-friendly
errors?

I hope I am clear..thanks for any suggestion
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] The changes you requested to the
table were not successful because they would create duplicate values in the
index, primary key, or relationship. Change the data in the field or fields
that contain duplicate data, remove the index, or redefine the index to
permit duplicate entries and try again.
Jul 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
monika wrote:
hi ...

I want to do error handling in my application. I have made a complete
application. but when I encounter errors (like mentioned below) I
want to do error handling. how can I do it?

I mean like in this case I can see if the record is being added
duplicate then I can always check for duplicate records and throw a
message. but I will face so many errors like this??? do we have a
list ..whereby I can get all the error numbers and there meanings and
I generate my own user-friendly errors?

I hope I am clear..thanks for any suggestion
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] The changes you requested
to the table were not successful because they would create duplicate
values in the index, primary key, or relationship. Change the data in
the field or fields that contain duplicate data, remove the index, or
redefine the index to permit duplicate entries and try again.


Use

On Error Resume Next

to disable the builtin error-handling. On the line following the one where
you attempt the insert or update, test the Err object to see if an error
occurred.

If Err.Number <> 0 then
'an error occurred
end if

Remember to turn the builtin error handler back on with

On Error GoTo 0

Do you have the vbscript documentation? If not: http://tinyurl.com/7rk6

HTH,
Bob Barrows

Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.