Link to home
Start Free TrialLog in
Avatar of small_potato
small_potato

asked on

CTLib BACKWARD cursor problem...

hi!
    I am using CTLib to connect the Sybase IQ Server. After executing the SQL statement, I retrieve the data by api cursor.
    The problem is, the header file(cspublic.h) commended that it does not support the backward cursor...any solution about that?

thanks.
Avatar of grant300
grant300

Well, yes and no.  If you need to walk the cursor backward the whole way, you can use DESC clause(s) on the ORDER BY..

I am betting what you really want is a bi-directional cursor.  Unfortunately, the only way to do that is to read the data from the cursor and into your own buffer as you go forward.  When you need to go backwards, you walk back through the local buffer.

It's not pretty but that's the way things were done before any of the databases engines supported bidirectional cursors.

BIll
from memory this functionallity was added recently (Open Client 12.5.??? it think)

download the latest open client
ChrisKing,

IQ is a couple of point revs behind ASE and CTlib.   Is Open Client 12.5.2 backword compatible with IQ 12.5  and still retain the new functionality?

Bill
ASKER CERTIFIED SOLUTION
Avatar of ChrisKing
ChrisKing

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of small_potato

ASKER

Thanks for the solution!