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] and [5])
especially and SQLites quoting rules...
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
--
Michael Schlenker
Software Engineer
CONTACT Software GmbH Tel.: +49 (421) 20153-80
Wiener Straße 1-3 Fax: +49 (421) 20153-41
28359 Bremen
http://www.contact.de/ E-Mail: [EMAIL PROTECTED]
Sitz der Gesellschaft: Bremen | Geschäftsführer: Karl Heinz Zachries
Eingetragen im Handelsregister des Amtsgerichts Bremen unter HRB 13215
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------