Aidan Reel wrote:
Hi
If I give sqlite3_complete the string 'select from Person;' should I
expect it to return zero or one?
Since it is not a valid Select statement I am expecting a zero, instead
I get a one.
If I remove the semicolon from the end of the string I receive a zero.
Regards
Aidan
Aidan,
You should expect a 1. The function sqlite3_complete only checks that
the statement is lexically complete (i.e. that it ends with a
semicolon). It is used by the shell to decide if it should issue a
continuation prompt when a line is input. It does not check if it is a
valid SQL statement, or if it makes any sense. Those functions are left
to sqlite3_prepare, and you. :-)
HTH
Dennis Cote