Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET SQL-Server
Hello EXPERTS !!
 
am working on Asp.Net, C#, SqlServer 2005.
 
I have a Registration page for Registering a web application....its working fine and storing in database table.
 
I have 2 Tables in SqlServer 2005 Database.
1)UserInfo
2)UserInfo_Archived
 
When UserInfo Table reaches 200 records....from this 200 records, 50 Records should be moved to UserInfo_Archived Table.
 
This process should be continued.
 
for this am using gridview to display the data.
 
Please help, how to move records from one table to another table if the table reaches 200 Records.
 
Thanks in Advance.
Posted 15-Feb-13 20:04pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

1. Check the COUNT of the rows in UserInfo table when you are inserting records
2. If COUNT<200 then no problem.
3. IF COUNT=200, write a query or stored procedure to dump the data from UserInfo to UserInfo_Archieved. Delete the rows which are dumped to UserInfo_Archieved.
  Permalink  

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

  Print Answers RSS
0 Maciej Los 450
1 OriginalGriff 393
2 Sergey Alexandrovich Kryukov 229
3 CPallini 189
4 CHill60 180
0 OriginalGriff 6,092
1 Sergey Alexandrovich Kryukov 5,022
2 Maciej Los 3,269
3 Peter Leow 3,164
4 DamithSL 2,490


Advertise | Privacy | Mobile
Web01 | 2.8.140721.1 | Last Updated 16 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100