I have one doubt regarding sqlite code.
I have 2 programs-one with sqlite3_exec() included in the code and in other
it is not included.I included those files which are zmain.c and zmain1.c
respectively.
First i created a database and added a table "em" and added some contents
to it,then i executed and prepared the sqlite select query.
I added "printf("result");" in the "case op_resultrow" of the function
sqlite3vdbeexec().
Here when i executed zmain.c,
sqlite3_prepare_v2(db, sql, strlen(sql) + 1, &selectStmt, NULL);
the above statement didn't print anything.
OUTPUT:
database opened successfully
result
result
result
result
Operation done successfully
Before
Afterprep
(clearly there is nothing between before and afterprep)
But when i commented the sqlite3_exec() in zmain1.c
due to sqlite_prepare_v2() function,the program somehow entered
sqlite3vdbeexec() and printed what i gave in my printf statement.
OUTPUT:
database opened successfully
Operation done successfully
Before
result
result
Afterprep
(clearly there are some output between before and afterprep)
My doubt is why the function call sqlite3_prepare_v2() called
sqlite3vdbeexec in second case and why not in first program.
zmain.c :- http://pastebin.com/ggmw9VTE
zmain1.c :- http://pastebin.com/xbgVLAyL
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users