ralphtrent
Programmer
Hello
I posted this in the c# forum, but someone suggest that I post here also. I need to connect to an MSSQL server in c# code using my domain account. Any ideas on how I would do that?
I have tried the following to now avial.
I am able to connect to the server using Query Analyzer and selecting Windows Authentication.
Any Ideas?
I posted this in the c# forum, but someone suggest that I post here also. I need to connect to an MSSQL server in c# code using my domain account. Any ideas on how I would do that?
I have tried the following to now avial.
Code:
private string _strConnString = "server=[ServerName];database=[
DatabaseName];uid=[Domain]\\[UserName];password=[Password]";
[green]//returns login failed for user [Domain]\\[UserName][/green]
private string _strConnString = "server=[ServerName];database=[
DatabaseName];Trusted_Connection=true";
private string _strConnString = "server=[ServerName];database=[
DatabaseName];Trusted_Connection=yes";
[green]//both return login failed for user null[/green]
I am able to connect to the server using Query Analyzer and selecting Windows Authentication.
Any Ideas?