On Mon, Feb 26, 2001 at 01:21:43PM -0500, Belcher, Jim wrote:
> the code looks fine, is the user you run this code with
> in the database as a valid user for database "mydb"?
The user exists, but I don't know if for that database. How do I know?
> -----Original Message-----
> From: Aristide Aragon [mailto:aristide(at)lionking(dot)org]
> Sent: Saturday, February 24, 2001 8:11 PM
> To: pgsql-general(at)postgresql(dot)org
> Subject: Help with pq++
> I need to make a program that uses pq++, before starting I made a little
> program to see if I understood correctly how to use pq++, however I have a
> problem: The program can't connect to the DB.
> My code looks like this:
> #include <stdio.h>
> #include <libpq++.h>
> int main()
> PgDatabase db("dbname=mydb");
> if (!(db.ConnectionBad()))
> printf("Error connecting\n");
> And no matter what I do (I tried with the env variables PGHOST, PGPORT,
> PGDATABASE and PGUSER) the program always gives me "Error connecting".
> Can somebody help? I was expecting to have problems, but not this early.
pgsql-general by date
|Next:||From: Norman J. Clarke||Date: 2001-02-26 19:53:51|
|Subject: avoiding endless loop in an UPDATE trigger|
|Previous:||From: Jose Manuel Lorenzo Lopez||Date: 2001-02-26 18:20:35|
|Subject: Permission denied while insert|