"Jeff Godfrey" <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I'm trying to determine the datatype of a given column using Tcl and the
> following code snippet...
>
> set dataType [$db onecolumn "select typeof($colName) from $table"]
>
Try this:
set quotedColName [string subst {" ""} $colName]
Jeff Godfrey schrieb:
- 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
- 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.
Jeff Godfrey schrieb:
Hi All,
I'm trying to determine the datatype of a given column using Tcl and the
following code snippet...
set dataType [$db onecolumn "select typeof($colName) from $table"]
Read about the Tcl substitution rules (
http://www.tcl.tk/man/tcl8.4/TclCmd/Tcl.htm#M11 , [4]
Hi All,
I'm trying to determine the datatype of a given column using Tcl and the
following code snippet...
set dataType [$db onecolumn "select typeof($colName) from $table"]
This works correctly as long as $colName (the name of the current column)
doesn't contain a space. When the column
5 matches
Mail list logo