Reputation: 4198
Ive got a question about Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AI" and "Latin1_General_CI_AI", now I know it can be set in sql using COLLATE SQL_Latin1_General_CP1_CI_AI, but I have an app that connects to different Dbs and not all are throwing that exception. Is there a way to support this on code level?
Upvotes: 1
Views: 2399
Reputation: 411
not ideal but just include where the data joins in your script:
collate database_default
Upvotes: 2
Reputation: 2552
I can't think of any way to resolve this from the application code.
From the SQL Server side of things the best solution if possible is to have matching collations on all the different servers you connect to(beware of breaking other apps that rely on a specific collation) If you don't have that level of control over your servers, second best would be to use the COLLATE command.
When your app connects to the database, you are comparing two columns that are stored using different collations.
Upvotes: 1