From: Michael Neumann Date: 2004-10-29T00:42:49+09:00 Subject: Re: How to connect to a DB2 database. On Fri, Oct 29, 2004 at 12:28:26AM +0900, Victor Reyes wrote: > Hello Ruby world. > The platform: > > ruby 1.8.2 (2004-07-29) [i386-mswin32] > Windows/XP > DB2 8.1.4 > DBname = dvddbase > > The questions: > > 1 - How do I talk (connect) to a DB2 database using Ruby? > 2 - Any sample code that can be shared? You need Ruby/DBI and Ruby/DB2. See RAA (raa.ruby-lang.org). http://ruby-dbi.rubyforge.org A simple example: require 'dbi' DBI.connect('dbi:DB2:dvddbase', 'username', 'password') do |dbh| p dbh.select_all('SELECT * FROM table') end Hope this helps. Regards, Michael