ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> ruby-talk
ruby-talk
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved