Reputation: 11639
I have defined a database with no username and password in SQL Server. Here is my connection string where I do not know what I should set in my User Id
and password
:
db = new SqlConnection("Server=localhost;Database=Scheduling_Employee;User ID=;Password=;");
Upvotes: 1
Views: 39095
Reputation: 1150
Can use the trusted connection,
for example,
Server=.\SQLEXPRESS;Database=myDB;Trusted_Connection=True;
Refer to this url for all other combinations http://www.connectionstrings.com/
Upvotes: 10
Reputation: 383
For your local machine you should be able to set the parameter Integrated Security = true;
That would allow you to use the windows authentication.
Upvotes: 2