And look at the oh so usefully provided return code from the prepare call ... there is NO POINT WHATSOEVER in looking at the statement pointer if the return code does not indicate that the prepare prepared anything. So if the returncode is ANYTHING OTHER THAN SQLITE_OK then you should be expecting the statement pointer to be null.
--- The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. >-----Original Message----- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of Jens Alfke >Sent: Friday, 1 September, 2017 12:46 >To: SQLite mailing list >Subject: Re: [sqlite] SQL statement and C++ > > > >> On Sep 1, 2017, at 11:23 AM, Papa <p...@arbolone.ca> wrote: >> >> I get an error indicating that binary_sql_statement evaluates to >NULL. > >Most often that means there's a syntax error in the SQL statement. >You should call sqlite3_errcode() to get the error code, and >sqlite3_errmsg() to get an error message. > >—Jens >_______________________________________________ >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