Then the first peanut may well be the last one, irrespective of the cardinality of the tin.
-----Ursprüngliche Nachricht----- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Don V Nielsen Gesendet: Dienstag, 15. Oktober 2019 21:52 An: SQLite mailing list <sqlite-users@mailinglists.sqlite.org> Betreff: [EXTERNAL] Re: [sqlite] Last record Keith, what if one has a peanut allergy? On Tue, Oct 15, 2019 at 1:33 PM Jose Isaias Cabrera <jic...@outlook.com> wrote: > > > Keith Medcalf, on Tuesday, October 15, 2019 02:26 PM, wrote... > > > > > > On Tuesday, 15 October, 2019 09:35, Philippe RIO, on > > > > >A short question : how could I know if I am reading the last record > > >with sqlite (sqlite3_step)? sqlite3_step only returns SQLITE_ROW. > > >Is there a function for that case which returns SQLITE_DONE? A > > >function which is > one > > >record in advance from sqlite3_step. > > > > When sqlite3_step returns SQLITE_DONE there are no more rows. > > > > A prepared statement is a row generator. Each time you ask it to > produce a > > row (sqlite3_step) it does whatever needs to be done to get you the > > next > row > > and gives it to you (SQLITE_ROW). Eventually it cannot generate > > another > row > > and you get the message that the generator is empty (SQLITE_DONE). > > []clip] > > > The only way that you have to know that the tin is empty is that > > when > you ask > > for a peanut the maid replies "Sorry luv, but the tin is empty", > > rather > than > > giving you a peanut. > > Keith, may I say thank you. Your parables are so teach-friendly, and > more than that, funny. I appreciate them. Thanks. > > josé > _______________________________________________ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___________________________________________ Gunter Hick | Software Engineer | Scientific Games International GmbH | Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013 | (O) +43 1 80100 - 0 May be privileged. May be confidential. Please delete if not the addressee. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users