4

I am trying to connect to a remote SQL server. I would like to know the proper way to connect to the server. TCP/IP protocol is enabled. I am trying this way:

@"Server=myserver.com\SQLEXPRESS; Database=mydatabase; User ID=user; password=pass"

I am using myserver.com to connect to the server via RDP and I can connect without any problems, but when I am using the combination above to connect to the SQL server via my code, it says that the server can't be found or does not exist.

Am I doing something wrong?

1 Answer 1

5

May I introduce you to http://www.connectionstrings.com whenever I have to manually create a connection string that's my first port of call. I can tell you right now that you can't do SQLExpress from a remote client (at least not the last time I checked). But here is the page for SQL Server connection strings. If it works, then it'll be there

Edit It looks like you can connect remotely. It's just not configured that way out of the box

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

Comments

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.