Problems to connect to SQL Server2000
Hi guys.
I need help. I have a Windows 2003 Server with a SQL Server 2000 installed.
The server is in my office, and I have two option, or being the server into the domain, or not. I want that the database is accesible from the domain and out the domain (I mean, from anyplace with a ip belonging to the intranet).
Curiously, when I'm in the office, with my laptop, logged in the domain, I have access to the sql server through my application in VB6. Now, I'm in my house connected through VPN to the intranet, and I can't access to the SQL Server through the application in VB6. If I make a ping to the server, I have answer, and even I'm connected to the server through Remote Connection, but If for example, I try to made a ODBC connection created from windows, but the server is not reachable.
I've trayed to do this:
Private Sub Create_connection()
Const PathConnection As String = "Provider=SQLOLEDB.1;Password=sa;Persist Security Info=True;User ID=sa;Initial Catalog=MigratedGist;Data Source=3.249.181.147,1433;Network Library=dbmssocn"
Set cnn = New ADODB.Connection
cnn.CommandTimeout = 100
Set rst = New ADODB.Recordset
With cnn
.ConnectionString = PathConnection
.Open
End With
End Sub
Before to do this, here, from my house, I executed this from the office, and I worked perfectly, but doesn't from my house...
Private Sub Create_connection()
Const PathConnection As String = "Provider=SQLOLEDB.1;Password=sa;Persist Security Info=True;User ID=sa;Initial Catalog=MigratedGist;Data Source=GISTSERVER"
Set cnn = New ADODB.Connection
cnn.CommandTimeout = 100
Set rst = New ADODB.Recordset
With cnn
.ConnectionString = PathConnection
.Open
End With
End Sub
I mean, only the difference is to change the Data Source. Should I choose the IP Address, the SQL Server Name... I don't know...
I don't know if I have to do something in the server to be reachable from anypleace with a ip from the intranet, or in my application.
I will apreciate very much your help.
Many thanks.
Luis. :WAVE: