problem connecting with libpq++ interface

From: "Deniz Hastorun" <denizh(at)itu(dot)edu(dot)tr>
To: <pgsql-interfaces(at)postgreSQL(dot)org>
Subject: problem connecting with libpq++ interface
Date: 2000-10-09 08:55:05
Message-ID: 000d01c031ce$9ed29a00$25054ba0@cc.itu.edu.tr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces


Hi everybody,

I have a really strange problem . I'm trying to connect to PostgreSQL db
from witin my C++ program and using the libpq++ interface functions . But
strangely it won't connect and I'm receiving the following error message

connection to db failed.
Error returned:ERROR: PQconnectdb() - Missing '=' after 'template1' in
conninfo

.here's my code
PGconn *conn1;
const char * dbname="template1";
PgDatabase data(dbname);
conn1=PQconnectdb(dbname);
if (data.ConnectionBad())
{
cerr<<" connection to db failed."<< endl
<<" Error returned:" << data.ErrorMessage() << endl;
exit(1);
}

any idea would be appreciated. thanks in advance!
deniz

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Gabriel Lopez 2000-10-09 09:01:28 Re: wrong documentation and others .....
Previous Message Tom Samplonius 2000-10-08 23:53:04 Re: ODBC problem