ct_scroll_fetch problem -
01-17-2009
, 07:48 AM
Hi everyone,
I'm new to this group and even don't know if it's the right one for my
question but I didn't find another.
I'm programming an app using the Open Client Client Library to connect to
an ASE 15 Server. The app uses scrollable cursors.
I've read the documentation and the example code carefully. But have the
following problem.
n = number of rows
After successfull ct_results the ct_scroll_fetch(cmd, CS_NEXT, CS_UNUSED,
CS_TRUE, &rows_read) is also successful but sets rows_read to zero.
Nevertheless I can get the actual row via ct_get_data.
The next call sets rows_read to zero again and there is no data available.
The third call sets rows_read to zero and the second row is readable.
..
..
..
The (2n-1)th call gives me the last row.
The (2n)th call gives no data.
The (2n+1)th call returns CS_SCROLL_CURSOR_ENDS.
The next ct_results call fails with "ct_results(): user api layer:
external error: This routine cannot be called until all fetchable results
have been completely processed."
Can anyone give me a clue what I'm doing wrong?
I want using scrollable cursors for efficient skipping a large amount
(many thousands) of rows at the beginning of a result. Can this be done
with normal read only cursors and ct_fetch also? Or does ct_fetch get the
data from the server even if I don't use binding or ct_get_data?
regards
Tilo Prütz |