sql connection string using sql authentication

Neeru picture Neeru · Sep 4, 2012 · Viewed 45.8k times · Source

I am using this sql connection string :

string connection = "data source=OSBORNECHARLES2;initial catalog=TWO;
integrated security=False;User ID=userid;Password=PWD";

I am getting this error :

A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)

If I set integrated security=True; it is working.
If I log in with another window user I'm getting error.

Can you please tell me why I'm getting this error.

Answer

Hassanuzzaman picture Hassanuzzaman · Jul 20, 2016

I think you can you use this

Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;User ID=myDomain\myUsername;Password=myPassword;