Page 1 of 1

TSmartQuery : Supress Exception

Posted: Wed 27 Jun 2007 14:01
by OzDelphiFan
I am having problem with EXCEPT and FINALLY code not executing after calling TSMARTQUERY.OPEN with an invalid SELECT statement

When running from the Delphi 6 IDE - when I call SmartQuery.OPEN the following error appears

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Project MYPROJECT.exe raised exception class EOraError with message 'ORA-00942: table or view does not exist
'. Process stopped. Use Step or Run to continue.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Then - my function exits and the FINALLY and EXCEPT sections in the function are bvpassed / stepped into as they are supposed to

If I run from outside of the IDE, the program immediately closes and no errors appear.

I am using Delphi 6 and the trial version of ODAC (I am planning to purchase a licensed version next week)

my code is similar to the following.

Thanks very much for any assistance that you can offer

====================================

var vQuery : TSmartQuery;
begin
vQuery := TSmartQuery.Create(nil);
vQuery.Session := MySession;

try
try
vQuery.SQL.clear;
vQuery.SQL.append ('SELECT THIS IS AN INVALID QUERY');
vQuery.Open; -- (#1)
ShowMessage (vQuery.FieldByName('MY_TEST_COLUMN').text);

except on E: Exception do
ShowMessage ('This is the EXCEPTION HANDLER');
end;

finally
ShowMessage ('This is the FINALLY');
vQuery.Free;
end;
end;

====================================

Posted: Wed 27 Jun 2007 14:32
by Challenger
We couldn't reproduce this error using information you have specified. Please send to ODAC support address complete sample that demonstrates this problem.

Posted: Thu 28 Jun 2007 02:04
by OzDelphiFan
Thanks

Ill try it again after I purchase the full version. If it doesnt work, Ill send it to support.