SmartRefresh conflicts with most-costed SQL Query, raises exception which can not be catched easily and usually

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Peng

SmartRefresh conflicts with most-costed SQL Query, raises exception which can not be catched easily and usually

Post by Peng » Thu 28 Jul 2005 07:20

We used many TSmartQueries whose SmartRefresh were set to true in the data module of the project to connect dictionary tables one by one, which is the most frequently-used method of development. However, unfortunately, it was the turn that we developed modules of report, where we also used some TOraQueries or TSmartQueries to select data, a problem came out. A few minutes after the PREVIEW button was pushed down, the data was selected out and the Excel report was made out, but there were two oracle exceptions following it, their error code are 1036 and 24337, which can not be catched in the OnException event of the main TOraSession, even though TApplicationEvents are resorted to. If we closed the SmartRefresh Property(set it to false), this problem would be solved.

Should I discard the benifit from SmartRefresh? How can I catch the two exceptions?

Peng

Post by Peng » Sat 30 Jul 2005 01:10

Is there anyone who can help me? Is Alex in?

HELP!HELP!HELP!!!!


Perhaps Most-costed SQL query can guide people to make a mistake, what I really want to mean is that a lot of things are done in the loop from
the first record to the last one in dataset and the cycle carries heavy burden and costs a lot of time.

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Mon 01 Aug 2005 13:03

SmartRefresh option uses TOraAlerter component internally, which uses its own TOraSession object and runs in its own thread. You can't get access to this OraAlert object to handle its OnError event. But you can use
TOraErrorHandler or global application OnException event handler to intercept these exceptions.

Peng

Post by Peng » Tue 02 Aug 2005 01:47

Alex, thanks for your reply, thank you.

Peng

Could Alex can look at this again, I still need your help.

Post by Peng » Fri 12 Aug 2005 01:11

Alex, a new accident happens. It seems that we can catch the two exceptions only at ODAC of version 5.55.0.20, but have no way to deal with this problem at newer versions or older ones. We don't know why this problem can stand. Alex, we still need your help.

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Mon 22 Aug 2005 14:34

I couldn't reproduce your problem. Please send us small demo project with your exception handling routine. Send your message to ODAC support address.

Post Reply