I did a lot of googling and looking around the related Ruby websites, but I
still cannot find a concreate example of how to connect to a database using
a DSN and/or a DSN-less connection.
If I do this with win32ole – it seems to me that sort of means my code is
not really crossplatform. So, I think I would like to do it with a general
odbc library…but maybe this is more trouble than it’s worth?
I do have a near-term need to grab 100,000+ contacts from a MS SQL Server
and place them into Outlook contacts. So my needs are win-specific.
Basically, if someone can tell me how to connect to the server, prepare and
execute a sql statement and then iterate over a result-set, I could probably
get this done.
I did a lot of googling and looking around the related Ruby websites, but I
still cannot find a concreate example of how to connect to a database using
a DSN and/or a DSN-less connection.
The big two are ODBC and DBI. I prefer DBI. The ruby-dbi package is at http://ruby-dbi.sourceforge.net/. DBI, like ODBC, is just a front-end
to various dbase specific drivers (DBD). There is ADO DBD which allows
you to use win32’ ADO infrastructure.
Basically, if someone can tell me how to connect to the server, prepare and
execute a sql statement and then iterate over a result-set, I could probably
get this done.
The ruby-dbi site glosses over the action you want to perform. A more
detailed explanation is found at perl-dbi site: http://dbi.perl.org/doc/index.html.
You can also come to ruby’s irc channel and ask some people.
I did a lot of googling and looking around the related Ruby websites, but I
still cannot find a concreate example of how to connect to a database using
a DSN and/or a DSN-less connection.
The big two are ODBC and DBI. I prefer DBI. The ruby-dbi package is at http://ruby-dbi.sourceforge.net/. DBI, like ODBC, is just a front-end
to various dbase specific drivers (DBD). There is ADO DBD which allows
you to use win32’ ADO infrastructure.
Basically, if someone can tell me how to connect to the server, prepare and
execute a sql statement and then iterate over a result-set, I could probably
get this done.
The ruby-dbi site glosses over the action you want to perform. A more
detailed explanation is found at perl-dbi site: http://dbi.perl.org/doc/index.html.
You can also come to ruby’s irc channel and ask some people.
It won’t show you specially how to connect with ADO, but you can find
instructions for the other stuff in the Ruby DBI article at: