On Mon, 2005-03-21 at 12:46 -0500, Peter G. Brown wrote:
> Hello,
> 
> I have the following:
> 
> 1:hello
> 2:goodbye
> 3:howdy in table t1.
> 
> I want to, via Tcl/Tk, assign each row to a variable and then display 
> each one as a label.
> 
> Could anyone provide a code snippet doing the above or a pointer? I 
> can't seem to assign the first two rows to labels - I always get the 
> last. I have tried foreach and for loops without success.
> 

    array set x [db eval {SELECT * FROM t1}]

After which x(1) contains "hello" and x(2) contains "goodbye"
and so forth.

-- 
D. Richard Hipp <[EMAIL PROTECTED]>

Reply via email to