Re: [firebird-support] Re: Cursor FETCH in PSQL and ROW_COUNT/'fetch past last record' error

2017-03-28 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
Hello Dmitry, >28.03.2017 10:06, Martijn Tonies wrote: >> >> So the first 'fetch' operation on a position that's invalid returns >> "rowcount=0", >> any additional fetch (which includes a move) returns an exception? > >Yes. Moving cursor from "last" to EOF is perfectly valid, "no data" >condition

[firebird-support] Re: Cursor FETCH in PSQL and ROW_COUNT/'fetch past last record' error

2017-03-28 Thread Dmitry Yemanov dim...@users.sourceforge.net [firebird-support]
28.03.2017 10:06, Martijn Tonies wrote: > > So the first 'fetch' operation on a position that's invalid returns > "rowcount=0", > any additional fetch (which includes a move) returns an exception? Yes. Moving cursor from "last" to EOF is perfectly valid, "no data" condition is not an error (as pe

Re: [firebird-support] Re: Cursor FETCH in PSQL and ROW_COUNT/'fetch past last record' error

2017-03-28 Thread 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
Hello Dmitry, So the first 'fetch' operation on a position that's invalid returns "rowcount=0", any additional fetch (which includes a move) returns an exception? That seems to be the case. With regards, Martijn Tonies Upscene Productions http://www.upscene.com -Original Message- F

[firebird-support] Re: Cursor FETCH in PSQL and ROW_COUNT/'fetch past last record' error

2017-03-27 Thread Dmitry Yemanov dim...@users.sourceforge.net [firebird-support]
27.03.2017 11:23, 'Martijn Tonies wrote: > > The FOR SELECT loop returns 1..10 as the values. > > The fetch/suspend lines return 1..10, with a row count of 1, and another > ‘10’ with a row count of 0. > > If I add another FETCH, I get this error while executing the routine: >>>attempt to fetch past