In my c # project that I work with local db, I need to clear the table. I can view the table that I cleared while the program is running, but when I restart it, it returns to its original state.However, I do not experience it problem when adding to my Sql table.i dont understand.Is there anyone who can help me?
SqlConnection SqlConn = new SqlConnection(@"Data Source = (Localdb)\MSSQLLocalDB; AttachDbFilename=" +
Directory.GetCurrentDirectory() + @"\HtbTs.mdf;" +
"Integrated Security=SSPI;Connect Timeout=30;User Instance=False");
SqlConn.Open();
string Delete = "DELETE FROM BagenTablo";
SqlCommand komut = new SqlCommand(Delete, SqlConn);
komut.ExecuteNonQuery();
SqlConn.Close();