Skip site navigation (1) Skip section navigation (2)

libpq - Unhandled Exception - Executing Samples under win32

From: "Eric Chapdelaine" <echapdel(at)newlogic(dot)tv>
To: <pgsql-interfaces(at)postgresql(dot)org>
Subject: libpq - Unhandled Exception - Executing Samples under win32
Date: 2006-02-13 22:07:43
Message-ID: 20060213220743.PTCV24441.tomts29-srv.bellnexxia.net@echapdelaine (view raw or flat)
Thread:
Lists: pgsql-interfaces
Hi,

 

I have downloaded the binairies no installer version of PostgreSql for
windows.  (postgresql-8.1.3-1-binaries-no-installer)

I am able to init a database ( initdb), create users and create a database.

I am also able to use the psql executable shell too to Create Table, Insert
record and Query information in my DB.

 

Where it get complicated, is when I try to use the lib libpq and the samples
that come with it.

I am able to compile and link the sample, but when it comes to call the
first DLL function, it crashes with an unhandled exception.

 

Here is the source code where it fails with a context before and after:

 

[,,,]

conninfo = "dbname = myDb";

 

            /* Make a connection to the database */

            conn = PQconnectdb(conninfo);

 

            /* Check to see that the backend connection was successfully
made */

            if (PQstatus(conn) != CONNECTION_OK)

            {

[.]

 

Does anyone knows how I can fix that problem ?

Thank you.

 

 

Eric 
Software Engineer
newlogic Canada
echapdel(at)newlogic(dot)tv

 

pgsql-interfaces by date

Next:From: Guy RouillierDate: 2006-02-13 22:11:47
Subject: JDBC support for CALL / PERFORM
Previous:From: Florian WeimerDate: 2006-02-13 21:29:04
Subject: Re: Client libraries supporting pipelining

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group