listBox1.Items.Clear(); cmd = new SqlCommand("SELECT SimNo FROM PurchaseEntry AS t1 WHERE country ='" + cmbcountry.SelectedItem.ToString() + "'and (IMEINo = 'N/A')and (SimNo NOT IN (SELECT others FROM challanout AS t2 )) and status!='"+"IN USE"+"'", con); SqlDataAdapter da = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); da.Fill(ds, "cout"); int i = ds.Tables[0].Rows.Count; for (int t = 0; t < i; t++) { listBox1.Items.Add(ds.Tables[0].Rows[t][0].ToString()); listBox1.Width = cmbitemtype.Width; listBox1.Height = Convert.ToInt32(listBox1.ItemHeight * i) + 10; }
da.fill
Cannot resolve the collation conflict between "Latin1_General_CI_AI" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)