I am trying to figure out how to get data from an array into an access
On the rubyonwindows site I found the following code:
db = AccessDb.new(‘c:\Baseball\lahman54.mdb’)
db.opendb.query(“SELECT * FROM AllStar WHERE playerID =
‘conceda01’;”)field_names = db.fields
rows = db.data
db.execute(“INSERT INTO HallOfFame VALUES (‘Dave’, ‘Concepcion’);”)
This code works fine if I break the array up into seperate elements but
I think there must be a simpler way.
this is how the array is built:
class <<Array def multi(n, *args, &block) if args.empty? Array.new(n, &block) else Array.new(n) do Array.multi(*args, &block) end end end end
so the question is; How do i get the data loaded into this array into my
access table called wps in a database wps.mdb?
I have been trying to do something like this:
db.execute(“INSERT INTO wps_test VALUES(‘card [$h]’);”
Any help would be greatly appreciated.