I am using SQL Express for managing database in windows application programmed in C#.
I am using the connection string Data Source=.\\SQLEXPRESS;Initial Catalog=caf;Integrated Security=True but it is not working in another machine. What can I do to make it work?
1 Answer
You are missing the: Server=myServerAddress;
"Server=myServerAddress;Database=myDataBase;User Id=myUsername; Password=myPassword;"
6 Comments
MeTitus
Firewall on the other machine maybe?
Kedar
thanku. if I give it my computer name then it will only work in my machine. Is there any way to get the user name of another machine in which it is to be installed
MeTitus
You need to set the server parameter in the configuration string to the ip or named pipe in where the SQL instance is running and make sure external connections to that machine are allowed,
MeTitus
Why would you add 127.0.0.1? You need to add the "external" ip not that localhost one.
Kedar
it gives an error. Error 26: error locating server/instance specified.
|
SQLEXPRESS?