hey there,
this is my code from filling a combobox, i suspect it should be the same for a checkboxlist :)
string connectionString1 = "Provider= ...etc"
string sqlstring1 = "select distinct (car_index) from sinter_car where status = 'Active' order by car_index";
OleDbConnection connection1 = new OleDbConnection(connectionString1);
OleDbCommand command1 = new OleDbCommand(sqlstring1,Connection1);
try
{
connection1.Open();
OleDbDataReader reader1 = command1.ExecuteReader();
while
(reader1.Read())
{
comboBox1.Items.Add(reader1["car_index"]);
}
reader1.Close(); }
catch (Exception)
{
MessageBox.Show("An exception error has occured!", "Exception Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
connection1.Close();