Hi Igor,

Thanks for the quick response.Suppose one record is there whose ID is 1 but
i am doing sqlite3_step with ID 2 ? At that time it didn't found the
record.What error it has to return if ID didn't matches ?

Thanks,
Aravind.

On Mon, Sep 15, 2008 at 5:29 PM, Igor Tandetnik <[EMAIL PROTECTED]> wrote:

> "Aravinda babu" <[EMAIL PROTECTED]>
> wrote in message
> news:[EMAIL PROTECTED]<[EMAIL PROTECTED]>
> > SQLITE returning SQLITE_DONE even if record is not present.
> >
> > I hope that the return code will
> > be
> >
> > SQLITE_NOTFOUND but i am getting  SQLITE_DONE ?
> >
> > Why is this happening ...........
>
> This is by design. sqlite3_step returns SQLITE_ROW for each row in the
> resultset, and SQLITE_DONE to indicate there are no more rows. So if a
> resultset contains N rows, then N calls would return SQLITE_ROW and
> (N+1)st returns SQLITE_DONE. An empty resultset is not in any way
> special, it follows the same logic with N=0 (so the very first call
> returns SQLITE_DONE). This allows client code to handle all resultsets
> uniformly.
>
> SQLITE_NOTFOUND is an obsolete error code that's currently not used for
> anything at all.
>
> Igor Tandetnik
>
>
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to