Click here to Skip to main content
14,836,361 members
Please Sign up or sign in to vote.
2.67/5 (3 votes)
See more:
how Delete all table data day by day using and sql searver??? please help
vaibhav mahajan 1-Mar-12 1:51am
do u want to delete data automatically..?..or with the user's interaction..?
Amal anjula 1-Mar-12 3:15am
without user.

Dear Amal,
Write the delete query in sqlcommand method and build the solution, you'll get one exe in Bin folder then assign this exe in windows scheduler as everyday running one.
F Y I, find the sample code,
dim con as new Sqlconnection("your connection string")
Dim cmd As New SqlCommand("delete from tablename", con)

But you have to careful when you delete the data automatically. Archive the old data because it's useful sometimes & it'll save you from terrible situations.
How to archive data from my production databases?[^]

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