Hello,
I am working with Delphi 7 and ODAC Net 5.80.0.41.
I am trying to open a stored procedure that returns a cursor and receive the "Out of Memory" exception.
This procedure has 2 parameters: one IN Clob and one OUT Cursor.
The cursor is based on a table with a very big number of columns. If the number of columns is small or average (50-70) the problem doesn't occur.
TOraStoredProc.FetchRows = 1000. //If I set 500 the problem doesn't occur or it takes much time to reproduce it.
TOraSession.Options.UseUnicode = True. //If it is False, it takes much more time to reproduce.
Also the value of the Clob parameter shouldn’t be empty.
I sent a test project where the problem can be easily reproduced to [email protected].
Note it also happens in the latest version of ODAC Delphi 7: ODAC Net 5.80.0.42.
Thanks,
Yevgeny
Clob poarameter causes "Out of Memory" exception
ODAC components store fetched rows in memory. For the table in your test project ODAC allocates about 500 M to store 1000 rows. Delphi memory manager has a problem when TOraStoredProc priodically allocates and frees so much memory.
We have tried to build your test project with FastMM4 (it is third party memory manager), and your project runs without problems.
I recommend to decrease memory usage of your application. You can use one of the following ways:
- Limit number of rows returned by the stored procedure and set FetchRows property to a less value
- Set Unidirectional property of TOraStoredProc to True. In this case only one row is stored in memory, but component cannot be linked to grid.
We have tried to build your test project with FastMM4 (it is third party memory manager), and your project runs without problems.
I recommend to decrease memory usage of your application. You can use one of the following ways:
- Limit number of rows returned by the stored procedure and set FetchRows property to a less value
- Set Unidirectional property of TOraStoredProc to True. In this case only one row is stored in memory, but component cannot be linked to grid.