Will print out the contents of .sql on failure to prepare statement.
This commit is contained in:
parent
589f7cec9f
commit
afb0a4848e
@ -116,7 +116,7 @@ static bool executequery(const char *sql, const char *str) {
|
||||
// prepare sql to s, reading until null character.
|
||||
con = sqlite3_prepare_v2(db, sql, -1, &s, NULL);
|
||||
if (con != SQLITE_OK) {
|
||||
fprintf(stderr, "Could not prepare SQL statement: %s\n", sqlite3_errmsg(db));
|
||||
fprintf(stderr, "Could not prepare SQL statement: %s\n\n%s", sqlite3_errmsg(db), sql);
|
||||
return false;
|
||||
}
|
||||
// bind parameter with a string length that is the # of bytes to null char.
|
||||
|
Loading…
Reference in New Issue
Block a user