Click here to Skip to main content
15,886,772 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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

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.
 
Share this answer
 
 
Share this answer
 
v2

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