I have a combobox in my form which I want to fill with data from one column in an SQL database. Any idea on how I do this?
Kind Regards
Printable View
I have a combobox in my form which I want to fill with data from one column in an SQL database. Any idea on how I do this?
Kind Regards
Query the database and populate a DataTable, then bind the DataTable to the ComboBox using its DataSource and DisplayMember properties. If you're not sure how to query the database then follow the Database FAQ link in my signature for information.
Note that there is a MySQL-specific ADO.NET provider available for download from the MySQL web site.