SHARE
TWEET

Untitled

a guest Jun 25th, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. string MyConnection2 = "datasource=???;port=3306;username=xxx;password=xxxx";
  2.             //Display query  
  3.             string Query = "select * from contableCAF.coa_dc;";
  4.             MySqlConnection MyConn2 = new MySqlConnection(MyConnection2);
  5.             MySqlCommand MyCommand2 = new MySqlCommand(Query, MyConn2);
  6.             //  MyConn2.Open();  
  7.             //For offline connection we weill use  MySqlDataAdapter class.  
  8.             MySqlDataAdapter MyAdapter = new MySqlDataAdapter();
  9.             MyAdapter.SelectCommand = MyCommand2;
  10.             DataTable dTable = new DataTable();
  11.             MyAdapter.Fill(dTable);
  12.             dataGridView1.DataSource = dTable;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top