Datareader and specific row

D

Daves

with a Datareader is there any way to go directly to a specific row?

if not, can I at SQL level select a particular row number based on "order
by" date parameter?
 
M

Mike Douglas

With the datareader you have to start with the first row. With the
dataset however you can go to a specfic row. The performance hit for
this is very minor.

As for in the SQL, I don't think there is anyway to get to a
particular row with the "order by" portion unless you can make it the
first row. You would need to do it in the WHERE clause. One idea is
you could create a dynamic temp table with the identity field that
could act as a row number then you can constrain by that. This option
will have a minor performance hit though.

I hope this helps.

Mike Douglas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top