Database connection

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
elsint
Forum Newbie
Posts: 7
Joined: Tue Jul 12, 2005 8:22 am

Database connection

Post 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
jrd
Forum Commoner
Posts: 53
Joined: Tue Mar 14, 2006 1:30 am

Post by jrd »

did you map the location to your system?
elsint
Forum Newbie
Posts: 7
Joined: Tue Jul 12, 2005 8:22 am

Post 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");
Post Reply