If I have 2 or more SQL statements which I execute with sqlite3_exec, it will execute the first statement.
- what is the simplest way to move to the second and subsequent statements
- is that done in the callback function?
If you insist on combining SQL statements into a single string:
Look carefully at the sqlite3_prepare() family of APIs, in particular at the pzTail parameter and its effect.
Otherwise, put your SQL statements into separate strings.
sqlite3_exec is a crutch that uses the SQLite3 prepare/bind/step APIs to provide a simplistic interface for use when it is adequate for the purpose.
It sounds like it is not adequate for your purpose.
Therefore, you should use the prepare/bind/step APIs directly.
And no, the callback function is used to handle the text results of executing the statement.