Am 22.06.2012 12:01, schrieb Richard Hipp:
On Fri, Jun 22, 2012 at 1:03 AM, deltagam...@gmx.net <deltagam...@gmx.net>wrote:

sqlite3_prepare_v2() 
<http://sqlite.org/c3ref/**prepare.html<http://sqlite.org/c3ref/prepare.html>>,
sqlite3_step() 
<http://sqlite.org/c3ref/step.**html<http://sqlite.org/c3ref/step.html>>,
and sqlite3_finalize() 
<http://sqlite.org/c3ref/**finalize.html<http://sqlite.org/c3ref/finalize.html>
,
 From the documentation  I saw, that sqlite3_exec "includes"
sqlite3_prepare_v2 , sqlite3_step, sqlite3_finalize.
But if the select_statement contains some variables to bind, is it
possible to use then the wrapper sqlite3_exec ?

If the select_statement would be
select_statement = "SELECT id, eventdate, eventtype, counter FROM eventlog
WHERE eventdate BETWEEN ? AND ?";

how would I use the wrapper sqlite3_exec ?

It is not possible to use sqlite3_bind_xxxx() with sqlite3_exec().  Any
variables in the sqlite3_exec() SQL will have the value of NULL.



______________________________**_________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-**bin/mailman/listinfo/sqlite-**users<http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users>


Thx for the quick response.

So sqlite3_exec can only be used with "static" sql_statements.

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to