Re: [sqlite] SQL Logic error for in-memory database
After executing sqlite3_step(), I check to see if the return code is SQLITE_OK if (rc != SQLITE_OK) { printf("%s\n", sqlite3_errmsg(dbhandle); } I will add sqlite3_reset() before calling sqlite3_errmsg(). Hemant Shah E-mail: hj...@yahoo.com --- On Wed, 9/15/10, Roger Binns <rog...@rogerbinns.com> wrote: > From: Roger Binns <rog...@rogerbinns.com> > Subject: Re: [sqlite] SQL Logic error for in-memory database > To: "General Discussion of SQLite Database" <sqlite-users@sqlite.org> > Date: Wednesday, September 15, 2010, 3:05 PM > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 09/15/2010 11:53 AM, Hemant Shah wrote: > > The error occurs while calling sqlite3_step(). > > Call sqlite3_reset and then get the error message text. > > Roger > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.10 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAkyRJu8ACgkQmOOfHg372QQV/gCeP+54VCTxuNoQMh2oClW07Tr/ > XA8Ani+2fvvjxo2hvBO6/N3SfkVXgUeR > =/Hs4 > -END PGP SIGNATURE- > ___ > 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
Re: [sqlite] SQL Logic error for in-memory database
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/15/2010 11:53 AM, Hemant Shah wrote: > The error occurs while calling sqlite3_step(). Call sqlite3_reset and then get the error message text. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkyRJu8ACgkQmOOfHg372QQV/gCeP+54VCTxuNoQMh2oClW07Tr/ XA8Ani+2fvvjxo2hvBO6/N3SfkVXgUeR =/Hs4 -END PGP SIGNATURE- ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQL Logic error for in-memory database
The error occurs while calling sqlite3_step(). Hemant Shah E-mail: hj...@yahoo.com --- On Wed, 9/15/10, Roger Binns <rog...@rogerbinns.com> wrote: > From: Roger Binns <rog...@rogerbinns.com> > Subject: Re: [sqlite] SQL Logic error for in-memory database > To: "General Discussion of SQLite Database" <sqlite-users@sqlite.org> > Date: Wednesday, September 15, 2010, 1:29 AM > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 09/14/2010 07:41 PM, Hemant Shah wrote: > > Sometimes I get following error: > > > > SQL logic error or missing database. > > That text corresponds to the error code SQLITE_ERROR which > is the code used > for a wide variety of error conditions that don't have a > more specific code. > > In any event you haven't even told us which API is > returning the code. > > http://www.chiark.greenend.org.uk/~sgtatham/bugs.html > > Roger > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.10 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAkyQZ9EACgkQmOOfHg372QRwlQCg3abzvZCSB83x4gxJ9422oiiQ > BrwAn0g4/NSB3XqALkDYx641B7jTNfIn > =hMN8 > -END PGP SIGNATURE- > ___ > 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
Re: [sqlite] SQL Logic error for in-memory database
--- On Tue, 9/14/10, Simon Slavin <slav...@bigfraud.org> wrote: > From: Simon Slavin <slav...@bigfraud.org> > Subject: Re: [sqlite] SQL Logic error for in-memory database > To: "General Discussion of SQLite Database" <sqlite-users@sqlite.org> > Date: Tuesday, September 14, 2010, 9:51 PM > > On 15 Sep 2010, at 3:41am, Hemant Shah wrote: > > > I have written a C program that creates in-memory > database. It reads packets from the network and insert some > info in the database. > > > > Sometimes I get following error: > > > > SQL logic error or missing database. > > Does the error occur only when starting your program, or > sometimes during a long run which had gone okay up to that > point ? It occurs after it is running for a while. If I ignore the error and continue, the inserts are successful for few more hours then I again get error. > > Is the database accessed from more than one thread or > process ? > No it is only accessed by one process (no threads). > Are you intentionally using NULL values anywhere ? > No. all columns are defined with NOT NULL. > Simon. > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > Hemant Shah E-mail: hj...@yahoo.com ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQL Logic error for in-memory database
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/14/2010 07:41 PM, Hemant Shah wrote: > Sometimes I get following error: > > SQL logic error or missing database. That text corresponds to the error code SQLITE_ERROR which is the code used for a wide variety of error conditions that don't have a more specific code. In any event you haven't even told us which API is returning the code. http://www.chiark.greenend.org.uk/~sgtatham/bugs.html Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkyQZ9EACgkQmOOfHg372QRwlQCg3abzvZCSB83x4gxJ9422oiiQ BrwAn0g4/NSB3XqALkDYx641B7jTNfIn =hMN8 -END PGP SIGNATURE- ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQL Logic error for in-memory database
On 15 Sep 2010, at 3:41am, Hemant Shah wrote: > I have written a C program that creates in-memory database. It reads packets > from the network and insert some info in the database. > > Sometimes I get following error: > > SQL logic error or missing database. Does the error occur only when starting your program, or sometimes during a long run which had gone okay up to that point ? Is the database accessed from more than one thread or process ? Are you intentionally using NULL values anywhere ? Simon. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users