PDA

Click to See Complete Forum and Search --> : How do you connect to a Remote Database over the Internet?


Nov 13th, 2000, 02:03 AM
We are moving our SQL database to a hosting company, but we still have to be able to do updates on the database over the internet using the Visual Basic application at our company. How can this be done? At the moment the connectionstring contains the following:
"Data Source = <computername>".

How can this be changed to for instance:
"Data Source = <url & the path of the SQL database>" ?

I've read about Winsock on the MSDN help files, but I still don't know how.

Skeen
Nov 13th, 2000, 03:00 AM
Hiya,

I've just found myself in a similar position. I'm running PWS locallyon my machine and host my scripts here aswell. This is available on my office network, however my database is on a server 20miles away which is accessed over the net. Just ensure you grant access rights to the IP address of the machine you are using to connect to your database and you shouldn't need to change your connetion string.

Set cnAcqAcc = CreateObject ( "ADODB.Connection" )
cnAcqAcc.ConnectionString " _
& " = "Provider=MSDAORA.1;DSN=Database name; " _
& " UID=Username;PWD=Password;"
cnAcqAcc.open

Hope this helps - It worked for me anywayz.

C Ya!

Skeen.

Nov 17th, 2000, 01:54 AM
Thanks a mil!
I'll try that.

chander
Jun 12th, 2001, 09:22 AM
in the above example how i can spacify Database path i.e server IP or name etc. as on local server as i give local system name , what has to be given here . suppose i made DSN on server for particular database then how to give it at client side i meant how to connect it to remote server .. can u pls ******** ... i will appriciate it ..