Hello Everyone!

I'm new to MS SQL, so this may be a dumb error, but anyway, I can't figure it out. I'd like to connect to an SQL server on the internet, I've a valid username and password, but it can't find the server.
So, I've tried the following connectionstring: ConnectionString="server=127.0.X.X; uid=XXXXXX; pwd=XXXXXXXXXXXX; database=master", but it won't even get to check the uid/pwd. I've the following error message: "A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) ".
I've tried using the TCP/IP but it says the same (can't find target computer, or something similar).
What is wrong with it?
I could use any help. so please, if you know, what the problem could be, post it!

Thank you very much!

Recommended Answers

All 6 Replies

Thank you! I know it's a stupid question, but on which computer? I've no admin rights on the target machine, and I barely think that they wouldn't allow remote connections. So, it should be done on my machine?

the sql server machine needs to be configured with that because it is the "remote" machine

Thank you again, but there must be another problem, because I asked the admins, and remote connections are allowed. So I think I did something wrong. Any other idea?

and tcpip is available?

if so, make sure your connection string is correct

Thank you for your help! The problem was with the remote computer, they did something wrong.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.