On Sun, 7 Jun 2009, Satoshi Asakawa wrote:

> Hi Dave et all,
> 
> _why already answered:
> > Shoes comes with sqlite3/ruby.
> 
> Yes, it's really cool! Try the following snippet. :)
> 
> require 'sqlite3'
> Shoes.app do
>   db = SQLite3::Database.new( "test.db" )
>   db.execute( "create table t1 (t1key INTEGER PRIMARY KEY,data TEXT,num
> double,timeEnter DATE)" )
>   db.execute( "insert into t1 (data,num) values ('This is sample data',3)" )
>   db.execute( "insert into t1 (data,num) values ('More sample data',6)" )
>   db.execute( "insert into t1 (data,num) values ('And a little more',9)" )
>   rows = db.execute( "select * from t1" )
>   rows.each{|k, d, n| para "#{k} : #{d} : #{n}\n"}
> end
> 
> References:
> http://sqlite-ruby.rubyforge.org/sqlite3/faq.html
> http://souptonuts.sourceforge.net/readme_sqlite_tutorial.html
> 
> Hope it helps,
> Satoshi
> 

Also see the stuff by James Edward Gray II on this:

http://www.bestechvideos.com/2008/09/17/lone-star-ruby-conf-2008-hidden-gems

I could have sworn there were more links by him on this, but can't 
find them now apart from a book review.

        Hugh

Reply via email to