At http://www.sqlite.org/c3ref/stmt.html , there is a weak implication
that SQLite may expect single sqlite3_stmt objects to exist for a
connection. The pattern I intend to follow instead of the one shown as
"life of a statement object goes something like this" is:
1. Create sqlite3_stmt #1
2. Create sqlite3_stmt #2
3. Bind values to sqlite3_stmt #1
4. Execute sqlite3_stmt #1
5. Reset sqlite3_stmt #1
6. Bind values to sqlite3_stmt #2
7. Execute sqlite3_stmt #2
8. Reset sqlite3_stmt #2
9. Repeat steps 6-8 as needed
10. Repeat steps 3-9 as needed
11. Destroy sqlite3_stmt #2
12. Destroy sqlite3_stmt #1
Is there any reason not to do this? (I would not be asking if I could
see any hint in the API docs that sqlite3_stmt objects can be used
independently, in arbitrary order, during their lifetimes.)
Thanks,
--
Larry Brasfield
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users