sql >> Database >  >> RDS >> Mysql

Vul Datagridview met MySQL-gegevens

       private void MySQL_ToDatagridview()
    {
        //VarribleKeeper.MySQLConnectionString = your connection string
       //info being your table name
        MySqlConnection mysqlCon = new  

        MySqlConnection(VarribleKeeper.MySQLConnectionString);
        mysqlCon.Open();

        MySqlDataAdapter MyDA = new MySqlDataAdapter();
        string sqlSelectAll = "SELECT * from info";
        MyDA.SelectCommand = new MySqlCommand(sqlSelectAll, mysqlCon);

        DataTable table = new DataTable();
        MyDA.Fill(table);

        BindingSource bSource = new BindingSource();
        bSource.DataSource = table;


        dataGridView1.DataSource = bSource;
    }


  1. tabellen tonen met graag Java en MySQL?

  2. Welk ontwerppatroon voor versiebeheer zou u aanbevelen?

  3. Begrijp de rol van data-architecten in datagovernance

  4. Wampserver 2.1 geeft oranje pictogram na installatie op Windows 7