Truncated tables automatically

Discussion in 'Programming' started by sreejukk08, Jan 13, 2012.

  1. #1
    I am facing a problem from my website.i am creating website in asp.net(C#) and sql server 2008.The problem is that the table likes truncating itself. I had loaded it yesterday, ran my application, went to sleep and today morning I find it truncated.After restoring data and clicking links more time for the website the table truncated.Please give me a solution for this problem.
     
    sreejukk08, Jan 13, 2012 IP
  2. codecre8r

    codecre8r Well-Known Member

    Messages:
    148
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    128
    #2
    I would look into your code first. Are you performing any SQL queries that might be accidentally deleting all the data? Maybe you have a WHERE clause that's incorrect and is deleting the data.

    Also, make sure you don't have a script, SQL statement, or stored procedure running that is dropping and creating the table.

    I would also check to see if you have any scheduled tasks that might be deleting the data or recreating the table.
     
    codecre8r, Jan 13, 2012 IP