3
Answers

Connect to SQL Server 2000 using Windows NT authentication

Administrator

Administrator

22y
1.3k
1
Almost all the articles that i had came across so far only teach us how to create a connection to SQL server using the SqlConnection by providing the User ID and password. If I am not mistaken, this way of connecting is through SQL authentication right? What I would like to know is that how to change the SqlConnection command so that it reflects the Windows NT authentication? I know that through the SQL Server Enterprise Manager we can add a linked server and login using 2 different ways. One of the login command is something like this : exec sp_addlinkedsrvlogin 'Accounts','false','Domain\Jack','JackP','Password' This command ensure that only the Windows NT user Domain\Jack connects through to the linked server. I wonder how this could be done using C# or is it possible to be done in C#. Thanks for the attention in advance.
Answers (3)