
MS SQL connection string for remote internet connection?
Hi!
I have my MS SQL 2000 server installed and working. On the server itself I
can connect with my username/password and access data as necessary. When I
try to connect from a remote connection over the internet (Using a VB6
program) I am having no luck at all.
The connection string that I'm using is:
Provider=SQLOLEDB.1;User ID=username;Password=password;Initial
Catalog=database;Data Source=68.145.45.32
This does not connect. I've tried including ",1433" after the IP as well as
adding the SQL server name after the IP (such as Data
Source=68.145.45.32/SERVER).
I'm also going through a router, which has port 1433 and 1434 forwarding to
my server PC without issue (it works for my other ports/services) (I've
tried TCP forwarding and UDP forwarding, which should I use?)
Can someone suggest what I might be doing wrong? Here is a sample of the VB6
code that I'm using...
Dim strConnect as string
Dim cnn As ADODB.Connection
Set cnn = New ADODB.Connection
strConnect = "Provider=SQLOLEDB.1" _
& ";User ID=username" _
& ";Password=password" _
& ";Initial Catalog=database" _
& ";Data Source=68.145.45.32"
cnn.Open sConn
Can anyone suggest how I should be connecting to my remote server?
Thanks!