Help Working with EDBEngineError exception 
Author Message
 Help Working with EDBEngineError exception

Im trying to handle database exception with EDBEngineError, which
works fine. But I want to know what kind of error it was (i.e., Key
violation, record no longer exists or was changed by another user,
etc.).  The EDBEngineError has an Errors property that contains the
ErrorCode, Category, SubCode, NativeError, and Message, but I dont
know what number corresponds to what error.  Im having trouble
finding any information on the ErrorCode in the help file, and I cant
find the const defs in the source.  Am I look for this information in
the wrong place?

By trial and error I have found out the following:
if NativeError = 0 and ErrorCode = 9729 then this is a key violation.
if NativeError = 0 and ErrorCode = 10259 then the record was updated
or delete by another user.

I dont want to rely on these numbers if they are going to change. Am
I going about this the wrong way?
Any Help is Appreciated
TIA

John



Sun, 20 Dec 1998 03:00:00 GMT  
 Help Working with EDBEngineError exception

Quote:

> Im trying to handle database exception with EDBEngineError, which
> works fine. But I want to know what kind of error it was (i.e., Key
> violation, record no longer exists or was changed by another user,
> etc.).  The EDBEngineError has an Errors property that contains the
> ErrorCode, Category, SubCode, NativeError, and Message, but I dont
> know what number corresponds to what error.  Im having trouble
> finding any information on the ErrorCode in the help file, and I cant
> find the const defs in the source.  Am I look for this information in
> the wrong place?

> By trial and error I have found out the following:
> if NativeError = 0 and ErrorCode = 9729 then this is a key violation.
> if NativeError = 0 and ErrorCode = 10259 then the record was updated
> or delete by another user.

Record *deleted* should be 10260. All BDE-errors (I believe) are part
of the stringtable resource in idr20009.dll

If you don't have Resource Workshop or something similar, I'm afraid
you'll have to loop through all possible error-codes and print them
out if you want a complete listing, but... the highest number is
16243!

Good luck!

Jasper

PS: please take into consideration
- when replying, I just think I know;
- when asking, be sure that I don't.



Fri, 25 Dec 1998 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Closing a form after an EDBEngineError exception is handled

2. EDBEngineError Exception

3. How to trap EDBEngineError-exceptions?

4. HELP Exception handling doesn't work

5. Exception logic no longer works

6. EDBEngineError -- has to do w/ FORMS -- HELP?!?!

7. EDBEngineError - Key Violation Help!!!

8. HELP: Using Date in where clauses EDBEngineError

9. Help: EDBEngineError

10. HELP with EDBEngineError

11. URGENT HELP: isapi dll and EDBEngineError

12. Help! EDBEngineError

 

 
Powered by phpBB® Forum Software