Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using (SqlConnection conn = new SqlConnection(connectionString))
- {
- conn.Open();
- using (SqlCommand cmd =
- new SqlCommand("UPDATE companyDB SET compname=@label3", conn))
- {
- cmd.Parameters.AddWithValue("@label3", cmpname.Text);
- int rows = cmd.ExecuteNonQuery();
- }
- }
- }
- catch (Exception ex)
- {
- MessageBox.Show("Not Updated");
- }
- new SqlCommand("UPDATE companyDB SET compname=@label3 where id = @id", conn))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement