Hi,
I obtained IP address of the target computer using:
Dim hostname As String = Dns.GetHostName()
Dim vrIPAddress As String = CType(Dns.GetHostByName(hostname).AddressList.GetValue(0), IPAddress).ToString
Then i tried to connect with that computer using connection string:
"Data Source=192.168.0.2,1433\MyInstance;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;
After a long pause, it says:
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: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)
The target system is configured for Firewall, allows Remote Connection etc, allows both TCP/IP connections.
Please advise.
Thanks
What I have tried:
I have searched google, tried different code snippets