Sunday, February 26, 2012

Error:Cannot resolve collation conflict for equal to operation.

Exception information:System.Data.SqlClient.SqlException: Cannot resolve collation conflict for equal to operation.
Who can tell me how to resolve this problem?
ThxIs this an error you've seen here on the ASP.NET Forums? (After all, you've posted this message in the forum dedicated to ASP.NET Forum bugs and discussions.)

Or, is this an error in your own application? If so, I will move this thread into theSQL Server and MSDE forum.|||Maybe I made a mistake.(I just met this error in my own server with asp.net environment)|||You've got mixed collations, this typically occurs when your underlying tables collation doesn't match the servers default collation. You need to specify the collation you want to use in the query. Look up COLLATE and DATABASE_DEFAULT.

It's also a common gotcha if you're using table vars, for the same reason, the same "COLLATE database_default" does the trick.

No comments:

Post a Comment