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

Re: Problem using PQgetvalue()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: MicazMAK <emoazzam(at)yahoo(dot)com>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Problem using PQgetvalue()
Date: 2007-04-29 17:03:13
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
MicazMAK <emoazzam(at)yahoo(dot)com> writes:
> Hi I am using PQgetvalue() function in  c to get the value of a field like
>  PQgetvalue(result,0,2)
>  but the program outputs following
> "column number 2 is out of range 0..0"
>  Can someone tell me how can I get this field and whats wrong?

Your result doesn't actually have three columns --- apparently it
has just one.  Better check which query you were issuing.

			regards, tom lane

In response to

pgsql-interfaces by date

Next:From: Maphin PhilipDate: 2007-05-01 11:25:05
Subject: postgres and c
Previous:From: MicazMAKDate: 2007-04-29 16:22:17
Subject: Problem using PQgetvalue()

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