X-Original-To: pgsql-interfaces@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 0DD124762EF for ; Mon, 5 May 2003 09:06:45 -0400 (EDT) Received: from fzkmail2.fzk.de (fzkmail2.fzk.de [141.52.27.52]) by postgresql.org (Postfix) with SMTP id 1199D474E42 for ; Mon, 5 May 2003 09:06:41 -0400 (EDT) Received: FROM resy5.fzk.de BY fzkmail2.fzk.de ; Mon May 05 15:06:39 2003 +0200 Received: œby rodos.fzk.de with ESMTP (8.8.6 (PHNE_17135)/8.7.1) id PAA17260; Mon, 5 May 2003 15:06:39 +0200 (METDST) Message-ID: <3EB661DE.59A026E1@rodos.fzk.de> Date: Mon, 05 May 2003 15:06:38 +0200 From: Christoph Haller X-Mailer: Mozilla 4.77 [en] (X11; U; HP-UX B.10.20 9000/780) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-interfaces@postgresql.org Cc: Garfield.palmer@beckfield030303.freeserve.co.uk Subject: Re: libpq msvc crashing Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=-9.6 required=5.0 tests=BAYES_10,QUOTED_EMAIL_TEXT,QUOTE_TWICE_1 autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200305/10 X-Sequence-Number: 4128 > Has anyone had problems running the testlibq in xp using msvc or encounterd= > this problem.=20 > > I am using postgresql 7.3.1, which if I run two command shell (one as a ser= > ver) it works fine. I only encounter problems when I try to run msvc. I am = > fairly new to postgresql, so I am basically trying to get the example progr= > ams to work, so that I know that the C programme communicates with the serv= > er, however everytime the programme compiles, It crashes. A college lecture= > r has looked at the code and commented out a lot of the code to establish w= > here its going wrong, to us it seems it does not like the line of code > > /* make a connection to the database */ > conn =3D PQsetdb (pghost, pgport, pgoptions, pgtty, dbName); > > > libpq.dll, libpq.lib and header files are included, pghost and pgport are= > set, we are not sure on pgoption and pgtty though, however we have simulat= > ed different scenarios and hit the same result. Compiles then CRASH, can an= > yone help.=20=20 > Could we see what's going on before calling PQsetdb, especially what type of variable dbName is and how it is set. Regards, Christoph