Cursor Location (ADO equivalent)

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
jeckels
Posts: 4
Joined: Mon 11 Feb 2013 19:35

Cursor Location (ADO equivalent)

Post by jeckels » Fri 15 Feb 2013 19:11

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?

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Cursor Location (ADO equivalent)

Post by AlexP » Mon 18 Feb 2013 13:51

Hello,

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

jeckels
Posts: 4
Joined: Mon 11 Feb 2013 19:35

Re: Cursor Location (ADO equivalent)

Post by jeckels » Mon 18 Feb 2013 17:48

Thanks. Memory reduced as expected with this setting.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Cursor Location (ADO equivalent)

Post by AlexP » Tue 19 Feb 2013 07:56

Hello,

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

Post Reply