Automatically Delete Record from table
i want that record automatically delete from table after 24 hours in c# (using linq to sql)
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Jignesh TrivediRank #16 · 50.3K reputationPosted Jan 19, 2015, 6:48 PM EST
Hi,
To achieve this you have to create console application which is run one time per day that delete your old record from table. else you can use SQL JOB to perform the same operation.
A job is a specified series of operations performed sequentially by SQL Server Agent. A job can perform a wide range of activities, including running Transact-SQL scripts, command prompt applications, Microsoft ActiveX scripts, Integration Services packages, Analysis Services commands and queries, or Replication tasks. Jobs can run repetitive or schedulable tasks, and they can automatically notify users of job status by generating alerts, thereby greatly simplifying SQL Server administration.
Please refer for SQL job...
http://msdn.microsoft.com/en-us/library/ms186273.aspx
hope this will help you.