[Wtr-general] Data driven tests
Chris McMahon
christopher.mcmahon at gmail.com
Mon Jan 8 11:21:21 EST 2007
> sth = dbh.run("Select * from tbl_dl")
>
all_records = sth.fetch_all
all_records now contains an ArrayOfArrays, where each row is a record in the
outer array, and each value in each row is an element in the inner array.
Assume "tbl_dl" has records for NAME and ADDRESS. all_records now contains
[[NAME1,ADDRESS1],[NAME2,ADDRESS2],[NAME3,ADDRESS3]]
and that should get you where you need to go.
http://www.ch-werner.de/rubyodbc/odbc.html is a good resource.
-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070108/0ec07528/attachment.html
More information about the Wtr-general
mailing list