Board index » delphi » Delphi 2.01 and Access 7.0

Delphi 2.01 and Access 7.0

I have a TQuery that issues an update SQL statement.  I am executing my
SQL statement in a try clause but it nevers jumps to the except section
of my code when there is an error.  Any help would be appreciated!

 

Re:Delphi 2.01 and Access 7.0


Quote
Charles J. Sergent wrote:

> I have a TQuery that issues an update SQL statement.  I am executing my
> SQL statement in a try clause but it nevers jumps to the except section
> of my code when there is an error.  Any help would be appreciated!

Can we see the code?

Oliver

Re:Delphi 2.01 and Access 7.0


Quote
Oliver Townshend wrote:

> Charles J. Sergent wrote:

> > I have a TQuery that issues an update SQL statement.  I am executing my
> > SQL statement in a try clause but it nevers jumps to the except section
> > of my code when there is an error.  Any help would be appreciated!

> Can we see the code?

> Oliver

I read in one of the newsgroups there was an option called, 'Stop on
Exceptions'
but I can't seem to find it.  Maybe it was on the older release of
Delphi.

I also tried the following to see if it was the databasecausing my
problem:

var a, b, c : integer;
begin
a:= 100;
b:= 0;
try
        showmessage('Should see this');
        c := a div b;
        showmessage('Should not see this');
except
        on EMathError do
                begin
                        MessageDlg('Can not divide by 0', mtError, [mbOK], 0);
                end
end;
end;
end.

I saw the 'Should see this' message and the 'Should not see this
message'.
Any ideas?

Other Threads