Maybe try assigning that data from the database to an array first then printing out the array in console to see if the data is even being collected from the database correctly.
Secondly, if the above method is working then you can rather use that array to load into the dropdown combobox like so:
Create a different class for the get and set methods:
public class getData{
public string Col1 { get; set; }
public int Col2 { get; set; }
}
Then use a loop to fill an array through a list:
getData[] allData = null;
string sql = @"SELECT col1, col2 FROM Carrier";
using (var command = new SqlCommand(sql, con))
{
con.Open();
using (var reader = command.ExecuteReader()){
var list = new List<getData>();
while (reader.Read())
list.Add(new getData{ Col1 = reader.GetString(0), Col2 =
reader.GetString(1) });
allData = list.ToArray();
}
Afterwards populate the comboBox by:
using (DataTable cTable = _SQLConnection.GetData("SELECT Name FROM Carrier")){
foreach (2ndClassname class1 in 2ndClassName.allData){
ComboBox.Items.Add(class1.COLUMNNAME);//I am unaware of how many columns your database has :/
}
}
Worth a try i guess?