Page 1 of 1

TOraQuery - NonBlocking mode & EOutOfMemory handling

Posted: Thu 21 Apr 2016 14:14
by pcz
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.

Re: TOraQuery - NonBlocking mode & EOutOfMemory handling

Posted: Tue 26 Apr 2016 13:15
by MaximG
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.

Re: TOraQuery - NonBlocking mode & EOutOfMemory handling

Posted: Tue 26 Apr 2016 13:23
by pcz
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!