pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Deniz Hastorun <denizh@itu.edu.tr>
To: pgsql-interfaces@postgreSQL.org
Subject: problem connecting with libpq++ interface
Date: Mon, 9 Oct 2000 11:55:05 +0300
Message-ID: <000d01c031ce$9ed29a00$25054ba0@cc.itu.edu.tr> (raw)


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




view thread (2+ messages)  latest in thread

Message-ID: <000d01c031ce$9ed29a00$25054ba0@cc.itu.edu.tr>
Permalink:  ../000d01c031ce$9ed29a00$25054ba0@cc.itu.edu.tr/
Also on:    postgresql.org/message-id/000d01c031ce$9ed29a00$25054ba0@cc.itu.edu.tr

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-interfaces@postgresql.org
  Cc: denizh@itu.edu.tr
  Subject: Re: problem connecting with libpq++ interface
  In-Reply-To: <000d01c031ce$9ed29a00$25054ba0@cc.itu.edu.tr>
  References: <000d01c031ce$9ed29a00$25054ba0@cc.itu.edu.tr>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox