Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string MyConnection2 = "datasource=???;port=3306;username=xxx;password=xxxx";
- //Display query
- string Query = "select * from contableCAF.coa_dc;";
- MySqlConnection MyConn2 = new MySqlConnection(MyConnection2);
- MySqlCommand MyCommand2 = new MySqlCommand(Query, MyConn2);
- // MyConn2.Open();
- //For offline connection we weill use MySqlDataAdapter class.
- MySqlDataAdapter MyAdapter = new MySqlDataAdapter();
- MyAdapter.SelectCommand = MyCommand2;
- DataTable dTable = new DataTable();
- MyAdapter.Fill(dTable);
- dataGridView1.DataSource = dTable;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement