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

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
h.hasenack
Posts: 48
Joined: Tue 20 Jan 2009 12:35

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

Post by h.hasenack » Wed 01 Apr 2009 12:26

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

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Fri 03 Apr 2009 07:27

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.

h.hasenack
Posts: 48
Joined: Tue 20 Jan 2009 12:35

Post by h.hasenack » Fri 03 Apr 2009 09:20

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

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Mon 06 Apr 2009 07:58

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.

Post Reply