TOraQuery - NonBlocking mode & EOutOfMemory handling

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
pcz
Posts: 81
Joined: Tue 04 Aug 2015 12:53

TOraQuery - NonBlocking mode & EOutOfMemory handling

Post by pcz » Thu 21 Apr 2016 14:14

Hello

I'm wondering how to handle TOraQuery exceptions properly in NonBlocking mode without using extra global variables. I think especially about protection in case of EOutOfMemory exception.

in blocking mode code like this:

Code: Select all

try
  OraQuery1.Open;
except
  OraQuery1.Close
end;
is just enough.

But in NonBlocking mode the only place in application where EOutOfMemory exception is being processed is Application.OnException handler...

In current versions of ODAC the <TOraSession>.OnError event is not being called after trying to fetch too much data...
(is it a bug or it happens by design?) I'm aware of 2 GB limit for 32-bit applications so I want to prevent it.

For me it's just not so easy to take any useful actions (for example disconnect session / close query) inside OnException handler, because unit with Application.OnException handler have no direct access to session instance in my code


Could it be possible to make any changes that will make possible to launch <TOraSession>.OnError event in case of EOutOfMemory?

Regards
P.C.

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: TOraQuery - NonBlocking mode & EOutOfMemory handling

Post by MaximG » Tue 26 Apr 2016 13:15

You can't use the TOraSession.OnError event handler to handle events related to lack of memory. TOraSession.OnError is applied to error handling only, that are returned by the Oracle server. We will investigate the possibility to handle exceptions like EOutOfMemory on using NonBlocking mode and inform you about the results.

pcz
Posts: 81
Joined: Tue 04 Aug 2015 12:53

Re: TOraQuery - NonBlocking mode & EOutOfMemory handling

Post by pcz » Tue 26 Apr 2016 13:23

MaximG wrote:You can't use the TOraSession.OnError event handler to handle events related to lack of memory. TOraSession.OnError is applied to error handling only, that are returned by the Oracle server. We will investigate the possibility to handle exceptions like EOutOfMemory on using NonBlocking mode and inform you about the results.
I'd be really happy if it could be implemented :D
Ok - so I wait for further informations :)
Thank You for answer!

Post Reply