Re: newbie libpq question... - Mailing list pgsql-interfaces

From D'Arcy J.M. Cain
Subject Re: newbie libpq question...
Date
Msg-id 20041108182155.086d9d58.darcy@druid.net
Whole thread Raw
In response to newbie libpq question...  (Doug Homoelle <homoelle@ll.mit.edu>)
Responses Re: newbie libpq question...  (Doug Homoelle <homoelle@ll.mit.edu>)
List pgsql-interfaces
On Mon, 08 Nov 2004 17:36:09 -0500
Doug Homoelle <homoelle@ll.mit.edu> wrote:
> I'm trying to use the libpq library for the first time and I'm
> experiencing what seems to be a very basic problem.  When I run the
> following:
> 
>         res = PQexec(conn, "select blah blah blah");
>         test_int=PQntuples(res);
>         fprintf(stdout,"number of rows: %f\n",test_int);
>         test_int=PQnfields(res);
>         fprintf(stdout,"number of cols: %f\n",test_int);
> 
> where "blah blah blah" is the selection criteria, I get zero rows and

I think you need "number of cols: %d\n" there.  Those functions returns
int.

-- 
D'Arcy J.M. Cain <darcy@druid.net>         |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.


pgsql-interfaces by date:

Previous
From: Tom Lane
Date:
Subject: Re: newbie libpq question...
Next
From: "Gaetano Sferra"
Date:
Subject: ecpg: using cursor returned from a stored function