Re: Re: Help with pq++

From: Aristide Aragon <aristide(at)lionking(dot)org>
To: Jose Manuel Lorenzo Lopez <jose-manuel(dot)lorenzo-lopez(at)conti(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Re: Help with pq++
Date: 2001-03-01 06:28:38
Message-ID: 20010301002838.B24194@busa.lionking.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Feb 27, 2001 at 10:09:49AM +0100, Jose Manuel Lorenzo Lopez wrote:
> Aristide Aragon schrieb:
> > On Mon, Feb 26, 2001 at 01:53:18PM -0500, Belcher, Jim wrote:

Hello

OK, I got the problem sorted out. The error message I received was "Error Message: FATAL 1: Database "mydb" does not exist in the system catalog."
That makes sense, the machine running this program doesn't have a mydb database, however I set the enviroment variable PGHOST to some other computer (and I just tested if I run the program there it returns OK).
While I won't be running this program over a network, I do would like to know what's going on.
How would I do it so that my program accesses the DB in another host? The documentation said (or at least that's what I understood) to export the PGHOST variable to the address of that other machine.
I'll be running my program web-based, if I wanted it to connect to some other host then, how'd I do it?

Thanks

Aristide

> Hello Aristide,
>
> I guess it's not your program, which seems okay, but your user.
> Please check if the user which is supposed to execute the program
> is added to the DB. If not do a createuser for the mentioned user.
>
> To be more sure add the following lines in the else-branch of your
> source-code:
>
> // Get a detailed message about the error ocurred
> fprintf(stderr, "Error Message: %s", db.ErrorMessage());
>
> or check the postmaster log after executing the program.
>
> Hope this will help you and give you confidence back for programming
> apps with postgresql! :)
>
> Best Regards / Un saludo / Mit freundlichen Grüßen / Cordiali Saluti
>
> José Manuel Lorenzo López
>
> --
> **********************************************************************
> ** José Manuel Lorenzo López **
> ** **
> ** ICA Informationssysteme Consulting & Anwendungsgesellschaft mbH **
> ** Dept. SAP Basis R/3 VBue **
> ** **
> ** fax : (+49511) 938-2270 **
> ** e-mail to: jose-manuel(dot)lorenzo-lopez(at)conti(dot)de **
> **********************************************************************
>

Browse pgsql-general by date

  From Date Subject
Next Message Denis Perchine 2001-03-01 07:33:27 Postgres eats up memory when using cursors
Previous Message Gordon A. Runkle 2001-03-01 06:18:29 Re: Migrate from MS SQL 6.5 to postgres??