Page 1 of 1

Database connection

Posted: Tue Mar 28, 2006 12:57 pm
by elsint
Hi,

I am trying to connect a database that is on another server but I can't!
I'm trying the code below but can not get it worked.

$conn = new COM("ADODB.Connection") or die("Cannot start ADO");
$conn->Open("Remote Provider=bla.blablabla.edu; Data Source=name_of_the_database; User ID=blabla; Password=blabla");

I appreciate any help!
Thanks

Posted: Tue Mar 28, 2006 6:35 pm
by jrd
did you map the location to your system?

Posted: Tue Mar 28, 2006 6:54 pm
by elsint
I solved it,

The coding should be lin this format:

$conn->Open("DRIVER=SQL Server;SERVER=server_ip;UID=username; PWD=password;APP=;DATABASE=database_name");