Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. MySqlConnection conn = new MySqlConnection();
  2.  
  3. try
  4. {
  5. conn.ConnectionString = cs;
  6. conn.Open();
  7. MySqlCommand cmd = new MySqlCommand();
  8. cmd.Connection = conn;
  9.  
  10. cmd.CommandText = "INSERT `prueba`.`facturas`";
  11. cmd.CommandType = CommandType.StoredProcedure;
  12.  
  13. }
  14. catch (MySqlException ex)
  15. {
  16. MessageBox.Show("Error: {0}", ex.ToString());
  17. }
  18. finally
  19. {
  20. if (conn != null)
  21. {
  22. conn.Close();
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement