Home > Archive > PostgreSQL for Windows > February 2006 > Unhandled Exception - Executing Samples









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Unhandled Exception - Executing Samples
Eric Chapdelaine

2006-02-13, 8:25 pm

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@newlogic.tv




Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com