From: Yohanes Santoso Date: 2003-01-29T06:15:12+09:00 Subject: Re: Connecting to a database.. "Dwayne Smurdon @ DNA Media Pro" writes: > I did a lot of googling and looking around the related Ruby websites, but I > still cannot find a concreate example of how to connect to a database using > a DSN and/or a DSN-less connection. The big two are ODBC and DBI. I prefer DBI. The ruby-dbi package is at http://ruby-dbi.sourceforge.net/. DBI, like ODBC, is just a front-end to various dbase specific drivers (DBD). There is ADO DBD which allows you to use win32' ADO infrastructure. > Basically, if someone can tell me how to connect to the server, prepare and > execute a sql statement and then iterate over a result-set, I could probably > get this done. :) The ruby-dbi site glosses over the action you want to perform. A more detailed explanation is found at perl-dbi site: http://dbi.perl.org/doc/index.html. You can also come to ruby's irc channel and ask some people. YS. gnome.