Skip to Content.
Sympa Menu

freetds - [freetds] dbnextrow() vs dbskiprow() (skipping rows in FreeTDS)

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Navdeep Shergill" <jatshergill AT gmail.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: [freetds] dbnextrow() vs dbskiprow() (skipping rows in FreeTDS)
  • Date: Sun, 27 Jul 2008 15:57:20 -0700

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




Archive powered by MHonArc 2.6.24.

Top of Page