SQLite Forum

Novice question concerning tcl sqlite and eval options and reusing prepared statements
Login
Thank you.  May I ask a specific follow-up please?

Is the proper method of preparing a statement that of passing the SQL in curly braces with the $var inside such that the variable substitution does not take place before it is passed to the eval command? Does that treat the $var something like a '?' in the C API and generate an equivalent prepared statement that will be used again when $var is a different value?

Or are prepared statements cached only after substitution such that there is not an equivalent in Tcl SQLite of a prepared statement with ?'s that can be reset and new values set through binding, whether automatic or manually coded?

For instance, regarding the SQLite documentation example of 
db1 eval {INSERT INTO t1 VALUES(5,$bigstring)} 
would there be a prepared statement with a '?" for $bigstring, such that, if the same statement was performed again when $bigstring was a different value, a new statement would not be prepared but the cached one would be reset and a new value bound?

I don't mean to be tedious or annoying, but am just not understanding how the way the Tcl expression is constructed impacts the way SQLite prepares statements for re-use.

Thank you.