Click here to Skip to main content
15,888,461 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
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;
            } 


I am getting error in line
C#
da.fill

that

C#
Cannot resolve the collation conflict between "Latin1_General_CI_AI" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.



Please any help Thank you....
Posted

1 solution

This error says collation of your TempDB and ProductionDB are different.
You should Create SQL Server temporary tables with the correct collation[^].

Also check : Fixing Collation: The Experiments[^]


I hope, this should be enough for you to understand the problem.
--Amit
 
Share this answer
 
v2
Comments
Anjanee Kumar Singh 27-Jun-13 6:14am    
I am getting this error after i added a new column
IndCallCode varchar(50) not null,
_Amy 27-Jun-13 6:16am    
Yes, read the links very carefully and try to understand why this collation error occurs. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900