More Group Sites
School Rankings
Jobless Net
Better Home
Enviro++


Help | Subscribe/Unsubscribe | Rules | Other Group Sites: Better Education | Better Education Forum
Welcome Guest Search | Active Topics | Members | Log In | Register

Cannot resolve the collation conflict between "Latin1_General_CI_AS" and Options · View
hong
Posted: Thursday, May 13, 2010 8:28:35 PM

Rank: Administration
Groups: Administration

Joined: 11/23/2008
Posts: 335
Points: 711
Location: Australia
1. Error while calling the Roles.AddUserToRole
If you have membership role issue in ASP.NET, you need to check whether the stored procedure 'aspnet_UsersInRoles_AddUsersToRoles' is still present after the database replication. Due to the collation conflict, it may be not copied to the new database server following migration. Here is the example of the error message:
I tried to run the script on the new database server and got the following error:
Msg 468, Level 16, State 9, Procedure aspnet_UsersInRoles_AddUsersToRoles, Line 49
Cannot resolve the collation conflict between "Latin1_General_CI_AS" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.

I resolved this collation issue this way:
In aspnet_UsersInRoles_AddUsersToRoles, change

Code:
DECLARE @tbNames table(Name nvarchar(256)  NOT NULL PRIMARY KEY)

to
Code:
DECLARE @tbNames table(Name nvarchar(256) COLLATE Latin1_General_CI_AS NOT NULL PRIMARY KEY)


Find what collation you are using in your database and use it.

I found the following change didn't work for me:
Code:
DECLARE @tbNames table(Name nvarchar(256) COLLATE DATABASE_DEFAULT NOT NULL PRIMARY KEY)


Sponsor
Posted: Thursday, May 13, 2010 8:28:35 PM
hong
Posted: Monday, November 01, 2010 11:16:43 AM

Rank: Administration
Groups: Administration

Joined: 11/23/2008
Posts: 335
Points: 711
Location: Australia
2. Error in executing sql statement: "Cannot resolve the collation conflict between "Latin1_General_CI_AS" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation"
Tip: Add "COLLATE SQL_Latin1_General_CP1_CI_AS" or try to get the correct statement from sql designer in Visual Studio or SQL Server management studio. For example,
Code:
table1.name = table2.Name COLLATE SQL_Latin1_General_CP1_CI_AS
Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

ASPNET Theme created by Boskone (Dan Ferguson)
Powered by Yet Another Forum.net version 1.9.1.8 (NET v2.0) - 3/29/2008
Copyright © 2003-2008 Yet Another Forum.net. All rights reserved.
This page was generated in 0.235 seconds.