Page 1 of 1

ORA-24374: define not done before fetch or execute and fetch

Posted: Wed 01 Apr 2009 12:26
by h.hasenack
What could cause this message? it happens when I TORATable.Open is called with TORAtable.ScrollableCursor=True.

When TORAtable.ScrollableCursor=False, my app runs out of RAM (165K+ records).

I create field objects BEFORE opening the table. When field objects are not created before opening the tabl;e (different test app) the error does not occur. Any hints/tips?


UPDATE 20090401

It seems to make no difference if I update fe fielddefs/fieldlist beforehand or not. Somehow it works from within a testapp nut not from within my main app.... :?

Maybe this has something to do with it? I'm indeed testing on 10g.

http://forums.oracle.com/forums/thread. ... dID=427027

:idea: UPDATE 20090401
Found 2nd requirement for generating the error: IndexFieldnames of TORATable needs to be set to something. SO error occurs when opeing a TORATable with ScrollableCursor=True and IndexFieldNames=


regards

Posted: Fri 03 Apr 2009 07:27
by Plash
The IndexFieldNames property is used for local sorting data on the client. This requires all data to be fetched to the client. So IndexFieldNames cannot be used with the ScrollableCursor option.

Posted: Fri 03 Apr 2009 09:20
by h.hasenack
Wouldnt it make sense to open the table (thus execute the SQL statement) using the provided indexfieldnames to pre-sort the data? That would make the SmartQuery even smarter!

Anyway: The error should not occur when opening the TORATable with indexfieldnames set or not. From what I understand form oracle error reporting it has something to do with the order in which buffers are provided/defined and data is fetched.

Regards

Posted: Mon 06 Apr 2009 07:58
by Plash
You can use the OrderFields property to sort records on the server side. TOraTable adds an ORDER BY clause to the SQL statement in this case.