Click here to Skip to main content
11,928,587 members (50,256 online)
Rate this:
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.

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 21:04pm
Rate this: bad
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.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.151126.1 | Last Updated 16 Feb 2013
Copyright © CodeProject, 1999-2015
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