Paging Recordsets from SQL Serverside

Posted by Jonno on Stack Overflow See other posts from Stack Overflow or by Jonno
Published on 2014-05-27T14:34:06Z Indexed on 2014/05/27 15:25 UTC
Read the original article Hit count: 190

Filed under:
|
|

I've been banging my head off this one for a while. I want to call 1k records from a SQL database and page them per 100. In classic ASP (where I'm moving from) this was dead easy to do with ADODB but with VB using ADO.net I can't find a single way that doesn't involve stored procs (which I want to avoid for now). It seems really stupid to call all 1k and sort it programmatically.

Edit: It's SQL Server 2005 / .net 4.0 / Visual Studio 2010.

Edit 2: Just to reiterate, I have Googled extensively and don't want to use stored procedures. There are many ways to get paged data but everything I see involves paging the data in the program rather than from the server.

© Stack Overflow or respective owner

Related posts about .NET

Related posts about sql-server