How to trap EDBEngineError-exceptions? 
Author Message
 How to trap EDBEngineError-exceptions?

Hi there.

I had this one corrupted table and every time I tried
to tblMyTable.Open, I would get EDBEngineError-exception.
Then I tried to:
try
   tblMyTable.Open;
except
   on EDBEngineError do.... something...
end;

But it didn't work. I couldn't catch the exception.

Then I tried to set Application.OnException to my own handler,
but it was never called on that particular exception. On other
exceptions it worked fine.

So, what is THE way to catch EDBEngineError-exceptions?

Pax,
    Petri

--
-------------------------------------------------
<><- Petri J. Riipinen   -  T:mi Digitronics <><-
<><- Rauhantie 3 C 19    -  28400 Ulvila     <><-
<><- Finland - +358-39-5389799 / 940-5476076 <><-

-------------------------------------------------



Sun, 03 May 1998 03:00:00 GMT  
 How to trap EDBEngineError-exceptions?
Quote:

>Hi there.

>I had this one corrupted table and every time I tried
>to tblMyTable.Open, I would get EDBEngineError-exception.
>Then I tried to:
>try
>   tblMyTable.Open;
>except
>   on EDBEngineError do.... something...
>end;

>But it didn't work. I couldn't catch the exception.

>Then I tried to set Application.OnException to my own handler,
>but it was never called on that particular exception. On other
>exceptions it worked fine.

>So, what is THE way to catch EDBEngineError-exceptions?

>Pax,
>    Petri

>--

Well, this is what I do.....

Try
  Sql1.Open;
Except
  On E:EDataBaseError Do
    MsgBox(E.Message);
End;

ALSO, remember that while in development mode, Delphi WILL break on the
exception before your exception handler kicks off!! You can stop this by
going to OPTIONS/ENVIRONMENT and click off the checkbox that says BREAK ON
EXCEPTION. When you do that, it'll just go to your handler...

- Show quoted text -

Quote:
>-------------------------------------------------
><><- Petri J. Riipinen   -  T:mi Digitronics <><-
><><- Rauhantie 3 C 19    -  28400 Ulvila     <><-
><><- Finland - +358-39-5389799 / 940-5476076 <><-

>-------------------------------------------------



Tue, 05 May 1998 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Closing a form after an EDBEngineError exception is handled

2. EDBEngineError Exception

3. Help Working with EDBEngineError exception

4. How do I trap Table Lookup exceptions?

5. Trapping Database Exceptions...

6. Trapping empty field exceptions

7. Trapping Database Exceptions...

8. Trapping exceptions from Oracle in Delphi

9. How to trap MS SQL Server SQLCode and SQLState for exception handling

10. Help with trapping exceptions in bound controls!

11. Trapping an IDAPI Exception

12. What means: 'At End of Table' (EDBEngineError exception).

 

 
Powered by phpBB® Forum Software