Advertisement
Guest User

Untitled

a guest
Apr 25th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. string constring = " datasource = localhost;port = 3306; username = root; password=root
  2. MySqlConnection conDataBase = new MySqlConnection(constring);
  3. MySqlCommand cmdDataBase = new MySqlCommand("select * from database.edata;" conDataBase;
  4. try {
  5. MySqlDataAdapter sda = new MySqlDataAdapter();
  6. sda.SelectCommand = cmdDataBase;
  7. DataTable dbdataset=new DataTable()
  8. sda.Fill(dbdataset);
  9. BindingSource bSource = new BindingSource;
  10. bSource.DataSource = bdDataset;
  11. dataGridView1.DataSource = bSource;
  12. sda.Update(dbdataset);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement