Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void Que(string q = "")
- {
- string constring = en.connectstr();
- SqlConnection conn = new SqlConnection(constring);
- SqlCommand cmd = new SqlCommand();
- cmd.CommandType = CommandType.Text;
- cmd.CommandText = q;
- cmd.Connection = conn;
- try
- {
- conn.Open();
- }
- catch (SqlException) { en.message(); }
- cmd.ExecuteNonQuery();
- conn.Close();
- this.Hide();
- add a = new add();
- a.Show();
- }
Advertisement
Add Comment
Please, Sign In to add comment