Re: Connection string - Mailing list pgsql-general

From Harpreet Dhaliwal
Subject Re: Connection string
Date
Msg-id d86a77ef0608131607t47b0a420w81bf996e1a96451c@mail.gmail.com
Whole thread Raw
In response to Re: Connection string  (Michael Fuhr <mike@fuhr.org>)
Responses Re: Connection string
List pgsql-general
Michael,
Please ignore my last email

At last I got error code 0.

Problem was with pg_hba.conf file

ECPGdebug(1, stderr); showed that in pg_hba.conf there was setting for localhost only and not for other ip addresses.

I had to change the configuration for IPV4 local connections

It should have been something like

host    all     all 192.168.0.0/24   trust 
instead of
host   all     all   127.0.0.1/32   trust (which is meant for localhost only)

I think i got it...right?

thanks alot for your help. Do you anymore inputs or warnings for me on this?

I'm highly obliged MIchael..

Thanks and regards,

~Harpreet


On 8/13/06, Michael Fuhr <mike@fuhr.org> wrote:
On Sun, Aug 13, 2006 at 01:58:54AM -0400, Harpreet Dhaliwal wrote:
> -402 sqlcode means "connection attempt to the database did not succeed"
>
> does this mean that my application is connecting to the database server but
> somehow failing in connecting to the database dbxyz due to some
> authentication problems???

What do the server's logs say?  Can you connect to the database
from the same machine using psql?  If you add the following line
to your program before the connect, what output do you get?

ECPGdebug(1, stderr);

--
Michael Fuhr

pgsql-general by date:

Previous
From: "Harpreet Dhaliwal"
Date:
Subject: Re: Connection string
Next
From: "Harpreet Dhaliwal"
Date:
Subject: Re: Connection string