Guest User

Untitled

a guest
May 26th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. public static void clearTable(String table)
  2. {
  3. String connString = "Server=localhost;Database=test;Uid=test;password=test;";
  4. MySqlConnection conn = new MySqlConnection(connString);
  5. MySqlCommand command = conn.CreateCommand();
  6. command.CommandText = "Delete FROM "+table;
  7.  
  8. try
  9. {
  10. conn.Open();
  11. }
  12. catch (Exception ex)
  13. {
  14. Console.WriteLine(ex.Message);
  15. }
  16. MySqlDataReader reader = command.ExecuteReader();
  17.  
  18.  
  19. }
Add Comment
Please, Sign In to add comment