help, sqlite3_get_table return 21,

classic Classic list List threaded Threaded
2 messages Options
W J
Reply | Threaded
Open this post in threaded view
|

help, sqlite3_get_table return 21,

W J
Hello ,

I'm using sqlite3_get_table() to query some information from sqlite. but sometimes( not every time), I got error return value: 21.
#define SQLITE_MISUSE      21   /* Library used incorrectly */

the version information is follow:
#define SQLITE_VERSION        "3.8.4.3"
#define SQLITE_VERSION_NUMBER 3008004
#define SQLITE_SOURCE_ID      "2014-04-03 16:53:12 a611fa96c4a848614efe899130359c9f6fb889c3"

What is the real meaning of this error? How to correct it?

thanks very much for your reply.

_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: help, sqlite3_get_table return 21,

Richard Hipp-3
On 10/22/18, W J <[hidden email]> wrote:
> Hello ,
>
> I'm using sqlite3_get_table() to query some information from sqlite. but
> sometimes( not every time), I got error return value: 21.
> #define SQLITE_MISUSE      21   /* Library used incorrectly */
>
> What is the real meaning of this error? How to correct it?
>

It means that you are violating the rules in some way.  SQLite is nice
and returned error 21 instead of segfaulting.

To get more information, run your application in a debugger and set a
breakpoint on the sqlite3MisuseError() function.  Then show us a stack
trace when that breakpoint is hit.

--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users