N
nbicc
I am trying to add some items to a ComboBox with the following code, will
someone please tell me what I am doing wrong, the Items.Add is where the
problem is I think. Thanks for your help
strSQL = "SELECT [bid-number] FROM [job-setup] Where [company-code] = " +
PrepareStr(ccode);
con = new
SqlConnection("Server=icc-server;DataBase=Construction;Integrated
Security=SSPI;Persist Security Info=False");
comm = new SqlCommand(strSQL, con);
if (con.State != ConnectionState.Open)
{
con.Open();
}
conrdr = comm.ExecuteReader();
while (conrdr.Read())
{
cbBidnumber.Items.Add("bid-number");
}
con.Close();
someone please tell me what I am doing wrong, the Items.Add is where the
problem is I think. Thanks for your help
strSQL = "SELECT [bid-number] FROM [job-setup] Where [company-code] = " +
PrepareStr(ccode);
con = new
SqlConnection("Server=icc-server;DataBase=Construction;Integrated
Security=SSPI;Persist Security Info=False");
comm = new SqlCommand(strSQL, con);
if (con.State != ConnectionState.Open)
{
con.Open();
}
conrdr = comm.ExecuteReader();
while (conrdr.Read())
{
cbBidnumber.Items.Add("bid-number");
}
con.Close();