I'm using C# + ASP.NET + SQL SERVER 2005
In my testing application I just open and close immediately connection to database doing it in that way
Code:
SqlConnection cn= new SqlConnection("server=(local);uid=agent1;pwd="+passwd+";database=CRM");
cn.Open();
cn.Close();
Next I try execute in query analyzer:
Code:
EXEC sp_dropuser 'agent1'
and that cause exception :
Code:
Could not drop login 'agent1' as the user is currently logged in. (Microsoft SQL Server, Error: 15434)
Next I execute query
Code:
select * from dbo.sysprocesses
and there is still record with atributte 'loginame' equal to 'agent1'
What am I doing wrong !?
Thanks for every advice in advance...