When I need to create an sql connection string, :
using System.Data.SqlClient;
string source = "server=(local)\\NetSDK;" +
"uid=QSUser;pwd=QSPassword;" +
"database=marketing";
SqlConnection conn = new SqlConnection(source);
conn.Open();
..how would I specify my windows network username/pwd, opposed to an sql administrative type shown above?
Thx
ChumThis is how you would do it. In ASP.NET the account trying to log into the database under windows authentication is the account you are runnig IIS under.
server=DatabaseServer;Trusted_Connection=true;database=DataBaseName;
0 comments:
Post a Comment