you can use if you use windows authentication
server=FlorinPilca-PC\SQLEXPRESS;database=DynamicWebServices;Integrated Security=True;
Question
I am trying to connect to a local database but I am having problems with the creation of the connection string.
I found a small program on the internet to test my connection (see screenshot here: http://s21.postimg.org/vlgsq7rw7/image.jpg).
The program shows the connection as successful but when I use this connection string( same input as in the screen shot):
server=FlorinPilca-PC\SQLEXPRESS;database=DynamicWebServices"
I get the exception
Login failed for user".
I tried all the users I could think of but none worked.
Please tell me what am I doing wrong?
Thank you.
Solution
you can use if you use windows authentication
server=FlorinPilca-PC\SQLEXPRESS;database=DynamicWebServices;Integrated Security=True;
OTHER TIPS
Try the following: Data Source=FlorinPilca-PC\SQLEXPRESS;Initial Catalog=DynamicWebServices;User ID=mylogin;password=mypassword;