# Here's an ADO example

require 'win32ole'

db = WIN32OLE.new("ADODB.Connection")
db.open ""Provider=SQLOLEDB;Data Source=MyServer;Database=MyDb;User
ID=sa;Password=password;"
rs = db.execute ("select * from MyTable")
rs.MoveFirst
rows = []
while !rs.eof
  rowhash = {}
  rs.fields.each do |field|
    rowhash[field.name] = field.value
  end
  rows << rowhash
  rs.MoveNext
end

# this produces an array of hashes - each hash representing each record

Chris
http://clabs.org