0

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?

3
  • This could be caused by a whole lot of things. You connection string looks like it's connecting to a local database. Is the database on the other machine? What error message are you getting back? Commented Aug 1, 2013 at 18:08
  • It is like server instance problem. Commented Aug 1, 2013 at 18:15
  • Is SQL installed on the other machine as an instance named SQLEXPRESS? Commented Sep 8, 2013 at 21:28

1 Answer 1

6

You are missing the: Server=myServerAddress;

Connection Strings

"Server=myServerAddress;Database=myDataBase;User Id=myUsername; Password=myPassword;"

Sign up to request clarification or add additional context in comments.

6 Comments

Firewall on the other machine maybe?
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
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,
Why would you add 127.0.0.1? You need to add the "external" ip not that localhost one.
it gives an error. Error 26: error locating server/instance specified.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.