Is this a bad way to page a datalist?

N

needin4mation

Is it a bad to page a datalist by using a dataadapter's fill method and
adjusting the int startRecord (in one of the overloads) as needed?

Example:

myAdap.Fill(myDS, index, 15, "contacts");

and changing the variable "index" as I need to? It would be 0 first,
then maybe 15 each time. index+=15 or index-=15? It seems to work so
far, but I do not know if it is "right." I am using SQL Server 2000 on
my host, so I cannot use ROWNUMBER(), afaik.

Thanks for advice.
 
S

Swanand Mokashi

Do you have an option to do the paging on the SQL Server side ??

Check out my article at
http://www.dotnetgenerics.com/Modules/TricksAndTips/SQLServer/DatabasePaging.aspx


--
Swanand Mokashi
Microsoft Certified Solution Developer (.NET) - Early Achiever
Microsoft Certified Application Developer (.NET)

http://www.dotnetgenerics.com/
DotNetGenerics.com -- anything and everything about Microsoft .NET
technology ...

http://www.swanandmokashi.com/
http://www.swanandmokashi.com/HomePage/WebServices/
Home of the Stock Quotes, Quote of the day and Horoscope web services
 

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,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top