On 9/16/05, Bret Pettichord <[EMAIL PROTECTED]> wrote: > There has been a lot of discussion regarding how to use Ruby to connect to > a database. It would be great if someone collected this information and > published it.
I've been doing lots of ODBC recently, and reading http://www.ch-werner.de/rubyodbc/odbc.html It's pretty handy. A nifty aspect of Ruby's ODBC (true of all of Ruby DBI?) is that the fetch methods consistently return arrays of arrays (AoA). That is SELECT a, b, c FROM table yields [[a1,b1,c1],[a2,b2,c2],etc]. Which I find really easy to use. I suspect that the reason that more Ruby DBI docs don't exist is that DBI is pretty old and extremely well-documented in other languages, particularly Perl. http://search.cpan.org/~timb/DBI-1.48/DBI.pm. There are whole books about Perl's DBI, and a DBI libraries all work in roughly the same way. -Chris _______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
