Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Dear Friends,

I have some problem when impliments projects.I have lots of records suppose 1 lack and i want to get all full data from database but in split data means first time i get records near about 20 thousand then second time 20 thousand such type and they show data on grid view.how to get such type of implimentation in asp.net


thanks in advanced !!
Posted
Comments
CHill60 6-Jan-15 4:17am    
Not clear. Try including the code you are having a problem with
ArunRajendra 6-Jan-15 4:32am    
Can you give the table design?

Keep the number of records configurable (20000 or 10000). Then fire your query as, "select top (no. of records) from........"
 
Share this answer
 
v2
In later versions of MSSQL you can use the OFFSET and FETCH NEXT options

e.g. For the first trance

SELECT * from [TableName]
ORDER BY [Column]
OFFSET 0
FETCH NEXT 10000 ROWS ONLY


and for the next tranche

SELECT * from [TableName]
ORDER BY [Column]
OFFSET 10000
FETCH NEXT 10000 ROWS ONLY
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900