Custom Paging - ASP.NET Grid + SQL 2000

L

Logu Krishnan

in short, the question is "How do i do custom paging in my asp.net grids" in
SQL 2000.
if i use default paging and if my db has ~200000 records, then i have to
select all the 2 lac records then bind to the grid.
whereas i've to show only 50 rows...

so if i do custom paging i can implement this in sql2005 using row_number,
but how would i simulate this in SQL2000

couple of constraints i have are
1. The queries are dynamic -
a. We allow user to create SQL Statements with in application /
design query using visual designer
b. we apply security on the sql statements based on user's security,
so if the does not have access to columnA we remove that from the query and
execute
c. so the same QueryA can execute differently for UserA,UserB etc
d. we also allow multi-level sorting and search in the grids

this seemed like breeze initially but slowly when i get to this, this seems
to be a bigger problem than i thought... or am i missing something ?!

HELP PLEASE :)
 
R

rampabbaraju

Create a temp table with an identity column. Insert all the rows into
the temp table and select from it.
 
L

Logu Krishnan

Thanks, but is there another way i could do this ? i don't want to select
millions of records and store it in a temp table when all i need is 50
records...
 

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

Forum statistics

Threads
473,995
Messages
2,570,225
Members
46,815
Latest member
treekmostly22

Latest Threads

Top