dbTalk Databases Forums  

ct_scroll_fetch problem

comp.databases.sybase comp.databases.sybase


Discuss ct_scroll_fetch problem in the comp.databases.sybase forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Tilo Prütz
 
Posts: n/a

Default 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

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.