dbnextrow() vs dbskiprow() (skipping rows in FreeTDS)
"Navdeep Shergill" <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <[email protected]> |
Hi
Currently everytime I call dbnextrow(); the results of the row are
loaded into memory so that I can retrieve them. I am looking for a
functionality that will allow me to do a 'skip row'. Basically advance the
row counter by 1 without actually loading the data in memory. Does freeTDS
have such a function available? I could not find it in the documentation.
Here is a sample scenerio. Lets say I have a table with 1000 rows and I
issue this query
select * from mytable;
If I wanted to read the '900th' row; then I would have to call dbnextrow()
900 times to get to that row. By calling dbnextrow; I have wasted all this
time loading data value for the previous 900 rows; even though I did not
need them at all. I am looking for some way to advance the cursor to the
900th row. (Without doing another db query).
I hope this is clear.
Any input would be greatly appreciated.
Thanks!
Navdeep