Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MySqlConnection connection = new MySqlConnection("datasource=localhost;port=3306;username=root;password=root");
- MySqlDataAdapter adapter;
- DataTable table = new DataTable();
- adapter = new MySqlDataAdapter("SELECT * FROM onlypracticie_c.test", connection);
- adapter.Fill(table);
- listBox1.DataSource = table;
- listBox1.DisplayMember = "name";
- listBox1.ValueMember = "id";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement