On Sat, May 03, 2008 at 03:07:00PM -0400, D. Richard Hipp wrote:
> > dbcomm eval {CREATE TABLE something( a_string VARCHAR(20) )}
> > dbcomm eval {INSERT INTO something VALUES ('Version V8.5')}
> >
> > Now, if you want to retrieve the value:
> >
> > tclsh8.5 [~/tmp/tcltk]dbcomm eval "SELECT a_string FROM something"
> > {{{{Version V8.5}}}}
> >
> > Why so much parentheses? A list, nested in a list, nested in a list?
> > But why?
>
> I get just {Version V8.5} when I try this.
OK, too much trust into the script functionality - I should check it out
interactively for sure.
There was an UPDATE in the script (in between), done following way:
dbcomm eval {CREATE TABLE something( a_string VARCHAR(20) )}
dbcomm eval {INSERT INTO something VALUES ('Version V8.5')}
set a [dbcomm eval "SELECT a_string FROM something"]
dbcomm eval {UPDATE something SET a_string=$a}
Of course, should have been:
set a [lindex [dbcomm eval "SELECT a_string FROM something"] 0]
--
pozdrawiam / regards
Zbigniew Baniewski
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users