Re: Executing SQL Query through ruby using winole32
by Michael Linfield other posts by this author
May 8 2008 1:59PM messages near this date
Re: Executing SQL Query through ruby using winole32
|
Re: Executing SQL Query through ruby using winole32
Anukul Singhal wrote:
> Hi,
>
> Can anybody help me which method would be used to execute a query in
> win32ole?
> I even tried database.query('....'), server.query('....') and
> server.execute('....') but no luck.
>
> Thanks,
> Anukul
Just out of curiosity, is there a specific reason you're using win32ole?
Using something such as DBI / mysql gems are often times much easier to
use.
IE:
require 'mysql'
server = Mysql.new("hostname","username","password","database")
results = []
qy = server.query("SELECT * FROM table")
qy.each do |x|
x.each do |z|
results << z
end
end
Regards,
- Mac
--
Posted via http://www.ruby-forum.com/.
Thread:
Anukul Singhal
Masaki Suketa
Michael Linfield
Anukul Singhal
Michael Linfield
Jac Clapp
|