error handling in asp-userfrindly messages

M

monika

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.
 
B

Bob Barrows

monika said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,796
Messages
2,569,645
Members
45,367
Latest member
Monarch

Latest Threads

Top