From: Brian Eldridge <beldri@runesoft.com>
To: pgsql-interfaces@postgresql.org
Subject: libpq problem
Date: Wed, 10 Mar 1999 22:24:22 -0600
Message-ID: <36E74576.F91D1084@runesoft.com> (raw)
Greetings! I'm new to this list, so if I over step some bounds or am
writing
to the incorrect list, please bear with me.
I'm trying to write an interface to a Linux implementation of PostgreSQL
6.4.2
from a Win 95 box. I downloaded the libpq.lib and it's cohorts for
6.4.2 for a
Windows 95 box. I'm having no trouble linking or compiling. My problem
is
one of a run-time nature. Whenever I try to connect to my Linux box, I
get
an "unknown host" error from libpq. If I use the psql.exe that came
with the libs,
it works fine. This is both, if I use an environment variable or use
the -h flag.
I can even connect using ODBC and MS Query, but whenever I try to
connect
with my homegrown prog, I get the invalid host error. Below is the code
I'm using
to connect:
pgdatabase = PQsetdb(szHost, szPort, NULL, NULL, szDatabase);
szHost, szPort, and szDatabase are all passed in. I've verified their
values, and
they are correct (i.e. the same values being passed to psql.exe). I've
gone as
far as to look at the psql.c file that came with my PostgreSQL source
and it does
a very similar call to PQsetdb:
settings.db = PQsetdb(host, port, NULL, NULL, dbname);
Any one have any idea why this might be happening?
Thanks in advance,
Brian
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 using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: beldri@runesoft.com
Subject: Re: libpq problem
In-Reply-To: <36E74576.F91D1084@runesoft.com>
* 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