I am trying to use CursorLocation and recordcount to do some basic record paging.
Despite using code I have used numerous times elsewhere I am unable to get the expected results using CursorLocation and recordCount always returns a value of -1.
I have used this basic example from codefixer (in addition to numerous others) and still get -1
I have tried various tests but my code always falls over either when setting the cursor location (Object or provider is not capable of performing requested operation.) or if it goes beyond that I just get -1 returned despite there being many more records in the table(s) which are displaying correctly when I loop throught the recordset.
I have now got around this problem the slow way (looping through the records once and manually increasing my recordcount, then reconnecting to actually display the data), however I am concerned that this problem will continue to annoy me for future projects and frankly I just want to know why code I have used thousands of times wont work here.
I have check the ADO version and it is above the minimum required. The only real difference in the setup here in that we are using Sybase (which I have never worked with previously), however I cant see how that would cause this problem.
If anyone has any suggestions let me know.
Thanks
maw
Despite using code I have used numerous times elsewhere I am unable to get the expected results using CursorLocation and recordCount always returns a value of -1.
I have used this basic example from codefixer (in addition to numerous others) and still get -1
I have tried various tests but my code always falls over either when setting the cursor location (Object or provider is not capable of performing requested operation.) or if it goes beyond that I just get -1 returned despite there being many more records in the table(s) which are displaying correctly when I loop throught the recordset.
I have now got around this problem the slow way (looping through the records once and manually increasing my recordcount, then reconnecting to actually display the data), however I am concerned that this problem will continue to annoy me for future projects and frankly I just want to know why code I have used thousands of times wont work here.
I have check the ADO version and it is above the minimum required. The only real difference in the setup here in that we are using Sybase (which I have never worked with previously), however I cant see how that would cause this problem.
If anyone has any suggestions let me know.
Thanks
maw