Fill many combo in a fORm fROm DB

  • Thread starter Thread starter Jassim Rahma
  • Start date Start date
J

Jassim Rahma

I have a form which has more than 10 combobox controls and all should be
filled from a different fields in different tables in one mySQL
database. I want to do this using the code and not at design time
because I have the connection setting in the registry.

what is the best way to do it (with example please) to make sure the
form loadng won't be too slow..

Many Thanks,
Jassim Rahma
 
I don't know if MySql supports multiple SQL queries concatenated with
semicolons. If it does, issue ten separate queries, one for the
contents of each combobox, and return a DataSet with ten tables in it.

Set the datasource for each combo to the specific table in the DataSet
that applies.

There's lots of sample code at MSDN online or in the Quickstarts. Also,
the documentation for the MySql ADO.NET provider probably also has
sample code.
 
Back
Top