Page 1 of 1

Cursor Location (ADO equivalent)

Posted: Fri 15 Feb 2013 19:11
by jeckels
I am doing more acceptance tests before I can decide to take ODAC as a replacement library.

One test that I cannot seem to get working is the concept of a client-side vs server-side cursor.

Consider this

Code: Select all

SELECT a, b, c, d, e FROM table1 WHERE b > 10
Let's say that will return 20,000,000 records.

On opening this query (nonvisual, programmatically), this consumes a TON of memory. Regardless of what I have my Query.FetchRows set to (and I have Query.FetchAll := False).

In ADO, there is a setting for CursorLocation. Which essentially tells ADO to use the cursor on the server, not a replicated cursor on the client.

Is there an equivalent option for ODAC/OCI?

Re: Cursor Location (ADO equivalent)

Posted: Mon 18 Feb 2013 13:51
by AlexP
Hello,

ODAC supports this functionality. To use server cursors, you should set the TOraQuery.Options.ScrollableCursor option to True.

Re: Cursor Location (ADO equivalent)

Posted: Mon 18 Feb 2013 17:48
by jeckels
Thanks. Memory reduced as expected with this setting.

Re: Cursor Location (ADO equivalent)

Posted: Tue 19 Feb 2013 07:56
by AlexP
Hello,

Glad to see that the problem was solved. If you have any other questions, feel free to contact us.