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
SqlConnection cn= new SqlConnection("server=(local);uid=agent1;pwd="+passwd+";database=CRM");
Next I try execute in query analyzer:
EXEC sp_dropuser 'agent1'
and that cause exception :
Could not drop login 'agent1' as the user is currently logged in. (Microsoft SQL Server, Error: 15434)
Next I execute query
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...