Pergunta

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.

Foi útil?

Solução

you can use if you use windows authentication

server=FlorinPilca-PC\SQLEXPRESS;database=DynamicWebServices;Integrated Security=True;

Outras dicas

Try the following: Data Source=FlorinPilca-PC\SQLEXPRESS;Initial Catalog=DynamicWebServices;User ID=mylogin;password=mypassword;

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top