Re: [GENERAL] PQexecParams and CURSOR

2005-01-18 Thread Laurent Marzullo
] PQexecParams and CURSOR On Mon, Jan 17, 2005 at 04:44:50PM +0100, Laurent Marzullo wrote: > > > > > > // res = PQexec( conn , "FETCH 1 FROM MY_CURSOR" ); > > > > The above should work if you uncomment it and comment out or remove > > the other two

Re: [GENERAL] PQexecParams and CURSOR

2005-01-17 Thread Michael Fuhr
On Mon, Jan 17, 2005 at 04:44:50PM +0100, Laurent Marzullo wrote: > > > > > > // res = PQexec( conn , "FETCH 1 FROM MY_CURSOR" ); > > > > The above should work if you uncomment it and comment out or remove > > the other two attempts to execute FETCH. > > On my machine (2.6.7-gentoo-r9) and

Re: [GENERAL] PQexecParams and CURSOR

2005-01-17 Thread Tom Lane
"Laurent Marzullo" <[EMAIL PROTECTED]> writes: > Ok so here is the full TEST program I try to run: I think you are running into an issue that was fixed during the 8.0 development cycle. From the CVS logs: 2004-08-01 21:30 tgl Allow DECLARE CURSOR to take parameters from the portal in w

Re: [GENERAL] PQexecParams and CURSOR

2005-01-17 Thread Laurent Marzullo
On Mon, Jan 17, 2005 at 11:28:57AM +0100, Laurent Marzullo wrote: > > // res = PQexec( conn , "FETCH 1 FROM MY_CURSOR" ); > The above should work if you uncomment it and comment out or remove > the other two attempts to execute FETCH. On my machine (2.6.7-gentoo-r9) and postgreSQL (pos

Re: [GENERAL] PQexecParams and CURSOR

2005-01-17 Thread Michael Fuhr
On Mon, Jan 17, 2005 at 11:28:57AM +0100, Laurent Marzullo wrote: > // res = PQexec( conn , "FETCH 1 FROM MY_CURSOR" ); The above should work if you uncomment it and comment out or remove the other two attempts to execute FETCH. > /* > res = PQexecParams(conn, >

Re: [GENERAL] PQexecParams and CURSOR

2005-01-17 Thread Laurent Marzullo
nish(conn); return 0; } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Michael Fuhr Sent: Sunday, January 16, 2005 1:32 AM To: Laurent Marzullo Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] PQexecParams and CURSOR On Fri, Jan 14,

Re: [GENERAL] PQexecParams and CURSOR

2005-01-15 Thread Michael Fuhr
On Fri, Jan 14, 2005 at 12:31:24PM +0100, Laurent Marzullo wrote: > paramValues[0] = "2"; // This is the parameter for the query > > res = PQexecParams( conn , > "DECLARE MY_CURSOR FOR " > "SELECT * FROM GRGL.RANGE_MODIFIER " > "WHERE WEAPON_ID = $1", > 1, > NULL, > paramValues, > N

[GENERAL] PQexecParams and CURSOR

2005-01-14 Thread Laurent Marzullo
Hello, I Could not achieve to use CURSOR with PQexecParams ! How to you do ? Here what I've done: 1) paramValues[0] = "2"; // This is the parameter for the query res = PQexec( conn , "DECLARE MY_CURSOR FOR " "SELECT * FROM GRGL.RANGE_MO