Board index » delphi » Exception errors, help please?

Exception errors, help please?

I'm creating a database application using Delphi V1.0 which connects to a
Access V2.0 database.

When connecting to the database the logon screen appears (as normal) and if
incorrect details are inputted, an exception error occurs.

However I'm having problems getting my head around these functions.  The
error raised is 'EDBEngineError' but if I put a try..except block in, which
should display a MessageDlg box if this error is raised the program still
falls over

procedure TForm1.Button1Click(Sender: TObject);
begin
     try
        Table1.Active := True;
     except
           on EDBEngineError do
           MessageDlg('Incorrect login details.', mtWarning, [mbOk], 0);
           end;
end;

Your educated and valued comments would be appreciated, Ta Mate!

 

Re:Exception errors, help please?


Quote
Steve Talbot wrote in message <69st45$2d...@eros.clara.net>...
>I'm creating a database application using Delphi V1.0 which connects to a
>Access V2.0 database.

>When connecting to the database the logon screen appears (as normal) and if
>incorrect details are inputted, an exception error occurs.

<snip>

Are you running the program independent of the IDE?

        -- Kirk

Re:Exception errors, help please?


I'm still running it within the IDE.

Quote
kroma wrote in message <69t70f$...@bgtnsc02.worldnet.att.net>...

>Steve Talbot wrote in message <69st45$2d...@eros.clara.net>...
>>I'm creating a database application using Delphi V1.0 which connects to a
>>Access V2.0 database.

>>When connecting to the database the logon screen appears (as normal) and
if
>>incorrect details are inputted, an exception error occurs.

><snip>

>Are you running the program independent of the IDE?

>        -- Kirk

Re:Exception errors, help please?


Turn off "Break On Exception" in the Options screen - then processing
will continue after the exception is raised.

Jez

Re:Exception errors, help please?


Quote
Jeremy Prime wrote:
> Turn off "Break On Exception" in the Options screen - then processing
> will continue after the exception is raised.

Nice one!  I would add that it's under Options|Environment, not
Options|Project where I might have expected to find it, but it kind of
makes sense having it under Environment since it's only an issue whilst
using the IDE.

--
David Gosnell
These personal views are not necessarily those of my employer.
(please remove "uce-buster." from my e-mail address if replying direct)

Other Threads