divyakrishnan 20 Junior Poster

Hi..

I had successfully connected MySQL database usng ADODB.But I could not connect Using PostgreSQL database with ADODB.I had used the following code for connection.

<?php


include("adodb/adodb.inc.php");
$db = NewADOConnection('postgres');


$c=$db->Connect("localhost", "postgres", "postgres", "dbname");
$db->debug = true;



if(!$c)
{
   echo "not connected";
}
else
{
  echo "successfully  Connected";
}

?>

It showing the message as not connected.

If anybody have any idea please help me..

Thanks