Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: SQL-Server VB.NET connection , +
Hi all,
 
I have problem with my sql connection, or sql port. I would like to connect with my VB.net application to sql database placed on my server (external machine). Normally, when I'm connected to normal net - everything works great. But when I'm trying to connect with the application to SQL database while I'm on Dual VPN net - ther's no connection.
 
Error appear:
System.Data.SqlClient.SqlException (0x80131904): 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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
 
and my connection string is like:
 
  Sub Connection()
        cnn.ConnectionString = "Data Source=SZYS2\MORSERVER;Initial Catalog=TimerTool;Integrated Security=True"
        'cn.ConnectionString = "Provider=" & provider & "; Data source=" & strDatabase
        cnn.Open()
...
...
 
I was trying to check the ping with telnet - no connection. The thing is, that to the shared folder on the server, where SQL is, I have access even when connected to Dual VPN...
 
I was thinking about - to put direct path to the database, but it's not working as well...
 
Any suggestions guys?
 
Thanks in advance!
Matt
Posted 8-Jul-13 3:59am
Comments
Prasad Khandekar at 8-Jul-13 9:35am
   
Hello,
 
Have you tried using ip address insted of host name in your Data Source? (http://www.connectionstrings.com/sql-server-2012)
 
Regards,
LordVovin at 8-Jul-13 9:39am
   
yes, but no connection as well.
Bernhard Hiller at 8-Jul-13 11:00am
   
The problem most likely is to be found in your VPN. Check that the port for the SQL Server is allowed in the VPN configuration.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 350
1 Jochen Arndt 190
2 Richard MacCutchan 135
3 Sergey Alexandrovich Kryukov 130
4 DamithSL 105
0 OriginalGriff 6,045
1 DamithSL 4,601
2 Maciej Los 4,087
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,310


Advertise | Privacy | Mobile
Web03 | 2.8.141220.1 | Last Updated 8 Jul 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100