Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using (SqlConnection con = new SqlConnection("Data Source=.\\SQLEXPRESS;AttachDbFilename=PLACE DATABASE DIRECTORY HERE;Integrated Security=True;User Instance=True"))
- using (SqlCommand cmd = new SqlCommand("PLACE UPDATE STATEMENT HERE", con))
- {
- try
- {
- con.Open();
- cmd.ExecuteNonQuery();
- Response.Redirect(Request.RawUrl);
- }
- catch (SqlException ex)
- {
- }
- finally
- {
- con.Close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement