Remote Connection VB6/SQL Server 2000
I have this connection string that works for locallan connection:
[Highlight=VB]
ConnectionString = "Provider=MSDASQL.1;Password=" & sPWD _
& ";User ID=" & sUserName & _
";Extended Properties=""Description=strData;DRIVER=SQL Server;SERVER=" _
& "myServer" & _
";UID=strUSER;PWD=strPASS;DATABASE=myDB"""
VBCODE]
but i want to modify it to connect remotely (internet) to my DB....
do I only have modify "myServer" to "IP:Port//ServerName" ?
Re: Remote Connection VB6/SQL Server 2000
You will need to provide valid URL to your server:
Provider=sqloledb;Data Source=YOUR.SQLSERVER.COM;Initial Catalog=pubs;User Id=myUsername;Password=myPassword;"
Re: Remote Connection VB6/SQL Server 2000
Quote:
Originally Posted by RhinoBull
You will need to provide valid URL to your server:
Provider=sqloledb;Data Source=YOUR.SQLSERVER.COM;Initial Catalog=pubs;User Id=myUsername;Password=myPassword;"
"xxx.xxx.xxx.xxx:xxx//servername" is a URL right?
Re: Remote Connection VB6/SQL Server 2000
Try it out - you will see the results ... ;)
Re: Remote Connection VB6/SQL Server 2000
no it doesnt work
Enterprise Manager can connect to it remotely but not my vb application :mad:
i found something about remote connection with sql2000 but this is different than my other connection string...is it what i want to do?:
MS Remote - SQL Server
If you want to use an ODBC DSN on the remote machine
oConn.Open "Provider=MS Remote;" & _
"Remote Server=http://myServerName;" & _
"Remote Provider=MSDASQL;" & _
"DSN=myDatabaseName;" & _
"Uid=myUsername;" & _
"Pwd=myPassword"
i tried it anyway and it doesnt work neither..please help :cry:
Re: Remote Connection VB6/SQL Server 2000
Did you see connection string that posted for you? If so then you wouldn't find any DSN in it... Also, is your IIS configured?
Re: Remote Connection VB6/SQL Server 2000
Quote:
Originally Posted by RhinoBull
Did you see connection string that posted for you? If so then you wouldn't find any DSN in it... Also, is your IIS configured?
yeah i tried it...no luck
what is IIS?
Re: Remote Connection VB6/SQL Server 2000
Perhaps this link will help to understand.
Re: Remote Connection VB6/SQL Server 2000
In case you can't find it you may also try using IP address:
Code:
strConnect = "Provider=sqloledb;Network Library=DBMSSOCN;"
"Data Source=130.120.110.001,1433;"
"Initial Catalog=MyDatabaseName;User ID=MyUsername;"
"Password=MyPassword;"
Re: Remote Connection VB6/SQL Server 2000
qoute: strConnect = "Provider=sqloledb;Network Library=DBMSSOCN;"
"Data Source=130.120.110.001,1433;"
"Initial Catalog=MyDatabaseName;User ID=MyUsername;"
"Password=MyPassword;"
end quote
if the solution doesn't work, try:
1. activate tcp/ip (see property for the tcp/ip port) protocol on the msde/sqlserver
run c:\Program Files\Microsoft SQL Server\80\Tools\binn\svrnetcn.exe
I hoped it helped you,
Greetings,
Gielen Rob