Joe Wilson wrote:
The transferred bindings are still opaque, aren't they?
--- Dan Kennedy <[EMAIL PROTECTED]> wrote:
Depends how desperate you are. Say you want to query statement
object X that has 4 variables, you could do this:
pTmp = sqlite3_prepare("SELECT ?, ?, ?, ?");
sqlite3_transfer_bindings(X, pTmp);
/* Use sqlite3_step() etc. to fish values out of pTmp */
sqlite3_transfer_bindings(pTmp, X);
sqlite3_finalize(pTmp);
Dan.
Joe,
Yes they are, but the ingenious part of Dan's idea is to transfer the
bindings from one statement, say an insert statement, to a select
statement. When you run the select it returns the values bound to the
parameters as the result of the select. This lets you see the values
that will be used if you run the first insert statement.
I thought it was a brilliant example of thinking outside the box.
Dennis Cote
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------