----- Original Message -----
From: "Michael Schlenker" <[EMAIL PROTECTED]>
set dataType [$db onecolumn {select typeof($colName) from $table}]
should do what you want. Note the {} instead of the "", which
prevent early substitution, so sqlite can use the $colName as a bind
variable.
Michael
Hi Michael,
Yeah, I agree that makes sense from a Tcl standpoint. In fact, that's
exactly what I started with. Unfortunately, it doesn't work as
expected and just returns the following:
Error: near "$table": syntax error
So, the curly-braces are preventing the Tcl parser from substituting
the vars (as they should), but then SQLite doesn't substitute the
$table var for some reason. I guess I'm a bit unclear on exactly
*what* SQLite is capable of substituting with regard to Tcl variables.
It only seems capable of substituting variables in certain cases, or
certain locations, or ??? I'm not sure.
I've found that if my table name is variable, I need for Tcl to
substitute it instead of SQLite - which lead me to my original
problem. Is SQLite's substitution working as expected? If so, can
someone point to more documentation regarding SQLite's Tcl var
substitution?
Thanks,
Jeff
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------