Click to See Complete Forum and Search --> : disconnect login


DanielaTm
May 24th, 2006, 08:48 AM
Hi,
I need from c# to drop an sql server login.
I create from code that login, work with him, and finally I have to drop it.
Now, the problem is when I send to sql server "drop login[Test]" it says that cannot drop the login, because he is still connected.
How can I send to the server an sql coomnad to disconnect the login first? the t-sql command I mean
Thanks,