I'm having a lot of trouble on a personal side project of mine connecting to a remote database from my windows form application.
Right now I am getting a
System.Data.SqlClient.SqlException A network related or instance specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible.
How do I know if my database is set up to allow remote connections?
Heres my code:
static SqlConnection connection;
string connectionString = "Server=name.db.5003672.hostedresource.com; Database=name; UId=name@IP; Password=password;";
connection = new SqlConnection(connectionString);
From my database page
Server: name.db.5003672.hostedresource.com (IP2 via TCP/IP)
the actual octets have obviously been changed to IP and IP2 and the name has been changed to name and password to password
I have also tried these changes to the connectionstring server
Hopefully anybody can have any type of insight for me, I am new to databases and connectionstrings in particular.