On Dec 07 06:36, Alexander Scholz wrote:
> sorry for probably asking such a stupid question, but we are using a
> PQexec(). Where should I specify that cursor declaration?
Just like as you're querying with pgAdmin:
PQexec(conn, "BEGIN");
PQexec(conn, "DECLARE \"test\" CURSOR FOR SELECT * FROM \"TEST\"");
for (...)
{
PQexec(conn, "FETCH FORWARD 100 from \"test\"");
/* Use just retrieved result. */
/* Don't forget to clear used PGresult. */
}
PQexec(conn, "...");
--
"We are the middle children of history, raised by television to believe
that someday we'll be millionaires and movie stars and rock stars, but
we won't. And we're just learning this fact," Tyler said. "So don't
fuck with us."