[ruby-dbi-users] Cannot connect to MSSQL from Windows7(64bit)

yuichi fujiki yfujiki at uh.edu
Thu Feb 25 15:02:16 EST 2010

Hello, I am having trouble connecting to MSSQL Server from 64bit Windows7.
I have been using Windows XP as a client before and the following connection
code worked just fine.

> require 'dbi'
> DBI.connect('DBI:ADO:Provider=SQLOLEDB;Data Source=hostname;Initial Catalog=dbname;User Id=user;Password=pass')

But on 64bit Windows7 I purchased recently, it throws following error.

DBI::InterfaceError: Could not load driver (uninitialized constant
from C:/Ruby/lib/ruby/site_ruby/1.8/dbi.rb:318:in 'load_driver'
from C:/Ruby/lib/ruby/site_ruby/1.8/dbi.rb:160:in '_get_full_driver'
from C:/Ruby/lib/ruby/site_ruby/1.8/dbi.rb:145:in 'connect'
from (irb):3
from :0

I googled around, but I didn't find anybody who had the same error.
Can anybody help me out?


More information about the ruby-dbi-users mailing list