pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedProblem using PQgetvalue()
2+ messages / 2 participants
[nested] [flat]
* Problem using PQgetvalue()
@ 2007-04-29 16:22 MicazMAK <emoazzam@yahoo.com>
2007-04-29 17:03 ` Re: Problem using PQgetvalue() Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 2+ messages in thread
From: MicazMAK @ 2007-04-29 16:22 UTC (permalink / raw)
To: pgsql-interfaces
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?
Thanks
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
Check outnew cars at Yahoo! Autos.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Problem using PQgetvalue()
2007-04-29 16:22 Problem using PQgetvalue() MicazMAK <emoazzam@yahoo.com>
@ 2007-04-29 17:03 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2007-04-29 17:03 UTC (permalink / raw)
To: MicazMAK <emoazzam@yahoo.com>; +Cc: pgsql-interfaces
MicazMAK <emoazzam@yahoo.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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2007-04-29 17:03 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-04-29 16:22 Problem using PQgetvalue() MicazMAK <emoazzam@yahoo.com>
2007-04-29 17:03 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox