From: ashbb Date: 2012-04-28T06:29:57+09:00 Subject: Re: ruby/shoes GUI - sqlite, how to isert a variable key in table? --14dae93411e13d22c704beafcee0 Content-Type: text/plain; charset=ISO-8859-1 Hi Danilo and folks, > I tried it but did not work = / Umm,... Could you try out the following snippet with your Shoes? require 'sqlite3' Shoes.app do db = SQLite3::Database.new "testtest.db" db.execute "create table t1 (text TEXT,num INTEGER)" db.execute "insert into t1 (text,num) values (3,3)" rows = db.execute "select * from t1" rows.each{|t, n| para "#{t.class} : #{t}, #{n.class} : #{n}"} end I got "String : 3, Fixnum : 3" on a Shoes window. I confirmed the above snippet with Shoes 3 (0.r1514) for Windows 7. ashbb --14dae93411e13d22c704beafcee0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Danilo and folks,

> I tried it but did not work =3D /
Umm,.= ..

Could you try out the following snippet with your Shoes?

r= equire 'sqlite3'
Shoes.app=A0 do
=A0 db =3D SQLite3::Database= .new "testtest.db"
=A0 db.execute "create table t1 (text TEXT,num INTEGER)"
=A0 d= b.execute "insert into t1 (text,num) values (3,3)"
=A0 rows = =3D db.execute "select * from t1"
=A0 rows.each{|t, n| para &q= uot;#{t.class} : #{t}, #{n.class} : #{n}"}
end

I got "String : 3, Fixnum : 3" on a Shoes window.
I= confirmed the above snippet with Shoes 3 (0.r1514) for Windows 7.

a= shbb
--14dae93411e13d22c704beafcee0--