From Garfield.palmer@beckfield030303.freeserve.co.uk Tue Apr 29 00:15:39 2003 X-Original-To: pgsql-interfaces@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 649BC475FC8 for ; Mon, 28 Apr 2003 20:15:39 -0400 (EDT) Received: from cmailm1.svr.pol.co.uk (cmailm1.svr.pol.co.uk [195.92.193.18]) by postgresql.org (Postfix) with ESMTP id 2DDF5475ECE for ; Mon, 28 Apr 2003 20:15:35 -0400 (EDT) Received: from modem-130.banzai.dialup.pol.co.uk ([62.25.228.130] helo=maincomputer) by cmailm1.svr.pol.co.uk with smtp (Exim 4.14) id 19AImW-0002tS-Vk for pgsql-interfaces@postgresql.org; Tue, 29 Apr 2003 01:15:37 +0100 Message-ID: <000a01c30de4$d7015840$836afea9@maincomputer> From: "Garfield Palmer" To: Subject: libpq msvc crashing Date: Tue, 29 Apr 2003 01:18:18 +0100 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0007_01C30DED.378FFF60" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Spam-Status: No, hits=-0.9 required=5.0 tests=BAYES_30,HTML_30_40 version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200305/4 X-Sequence-Number: 4122 This is a multi-part message in MIME format. ------=_NextPart_000_0007_01C30DED.378FFF60 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi 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 Thanks=20 Garfield palmer_garfield@hotmail.com ------=_NextPart_000_0007_01C30DED.378FFF60 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi
Has anyone had problems running the testli= bq in xp=20 using msvc or encounterd this problem.
 
I am using postgresql 7.3.1, which if I ru= n two=20 command shell (one as a server) it works fine. I only encounter problems wh= en I=20 try to run msvc. I am fairly new to postgresql, so I am basically= =20 trying to get the example programs to work, so that I know that the C= =20 programme communicates with the server, however everytime the=20 programme compiles, It crashes. A college lecturer has looke= d at=20 the code and commented out a lot of the code to establish where its go= ing=20 wrong, to us it seems it does not like the line of code
 
/* make a connection to the database=20 */
conn =3D PQsetdb (pghost, pgport,  pg= options,=20 pgtty, dbName);
 
 
libpq.dll, libpq.lib and header files are= =20 included,  pghost  and pgport are set, we are not sure on pgoptio= n and=20 pgtty though, however we have simulated different scenarios and hit the sam= e=20 result. Compiles then CRASH, can anyone help.  
 
Thanks
 
Garfield
palmer_garfield@hotmail.com
------=_NextPart_000_0007_01C30DED.378FFF60-- From ch@rodos.fzk.de Mon May 5 13:06:45 2003 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