From: Tom Lane <tgl@sss.pgh.pa.us>
To: MicazMAK <emoazzam@yahoo.com>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: Problem using PQgetvalue()
Date: Sun, 29 Apr 2007 13:03:13 -0400
Message-ID: <24473.1177866193@sss.pgh.pa.us> (raw)
In-Reply-To: <20070429162217.14162.qmail@web36806.mail.mud.yahoo.com>
References: <20070429162217.14162.qmail@web36806.mail.mud.yahoo.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: tgl@sss.pgh.pa.us, emoazzam@yahoo.com
Subject: Re: Problem using PQgetvalue()
In-Reply-To: <24473.1177866193@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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