Have a Question?
Table of Contents
< All Topics

Error in FrmSetupUsers.Form_Open


isThat error occurs when a login name exists in more than one role, which can occur if the user was added through SQL Server Management Studio.  Run the attached script in SSMS to find duplicate LoginName records, then remove the user from all but one role.  Enter your database name in the USE statement at the top of the script.

USE [DatabaseName];

SELECT sp.name AS LoginName, m.name AS UserName, r.name AS RoleName,
RIGHT(sp.name, LEN(sp.name) – CHARINDEX(‘\’, sp.name)) AS Login, RoleNumber =
     Case R.Name
         WHEN ‘lims_readonly’ THEN 0
         WHEN ‘lims_sampler’ THEN 1
         WHEN ‘lims_technician’ THEN 2
         WHEN ‘lims_admin’ THEN 3
         WHEN ‘db_owner’ THEN 4
         ELSE 99
 FROM sys.database_role_members rm
 INNER JOIN sys.database_principals r on rm.role_principal_id = r.principal_id
 INNER JOIN sys.database_principals m on rm.member_principal_id = m.principal_id
 INNER JOIN sys.server_principals sp on sp.sid = m.sid;

Table of Contents