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