Re: [GENERAL] ECPG and Curors.

2006-06-13 Thread John Smith
On Mon, Jun 12, 2006 at 11:14:24PM -0400, Peter L. Berghold wrote: > what I don't see is how to detect that I've fetched the last row from a > query. Is there more complete doco on this process somewhere? You could either handle a NOT FOUND exception, or make use of SQLCODE or SQLSTATE like thi

Re: [GENERAL] ECPG and Curors.

2006-06-12 Thread Michael Meskes
On Mon, Jun 12, 2006 at 11:14:24PM -0400, Peter L. Berghold wrote: > what I don't see is how to detect that I've fetched the last row from a > query. Is there more complete doco on this process somewhere? Just look for "exec sql whenever not found ..." Michael -- Michael Meskes Email: Michael

[GENERAL] ECPG and Curors.

2006-06-12 Thread Peter L. Berghold
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I'm looking at the documentation for Postgresql in Chapter 30 and I'm checking out how to use FETCH INTO and CURSORs to loop through multiple results from a table. In the documentation they show something like EXEC SQL DECLARE foo CURSOR for select a