Home DotNet FIXED: ASP.NET Membership API Cannot resolve collation conflict for equal to operation
FIXED: ASP.NET Membership API Cannot resolve collation conflict for equal to operation

If you are using ASP.NET Membership API then you may experience an error Cannot resolve collation conflict for equal to operation.

The reason you are getting this error is because some of the statement in the store procedure is using a different collation to your database collation.

You will have to make two small change to the ASP.NET Membership API store procedure for it to work.

aspnet_UsersInRoles_RemoveUsersFromRoles
aspnet_UsersInRoles_AddUsersToRoles

Locate the line:

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

and replace it with this line. Note that my database collation is Latin1_General_CI_AS so I use COLLATE Latin1_General_CI_AS. Replace this with your database collation.

Here how's to find out your database collation.

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

Once these two store procedures is updated then you shouldn't get the error anymore.

 



Comments (0)
Write comment
Your Contact Details:
Comment:
[b] [i] [u] [url] [quote] [code] [img]   
:D:angry::angry-red::evil::idea::love::x:no-comments::ooo::pirate::?::(
:sleep::););)):0
Security
Please input the anti-spam code that you can read in the image.

"