uninitialized constant ODBC::SQL_DBMS_NAME

Hello,

I am connecting my rails app to an sql server. Or at least trying to. My local development set up works great. Its using iODBC and FreeTDS. My shared hosting provider installed unixODBC and FreeTDS. Working with them, I have the shared server connecting to my Database server. However, when I run script/console it doesn't work.

I have my ODBC.ini file and FreeTDS.conf file set up so that using tsql to check the connection works, as does isql.

However, when I run script/console, I get this error:

ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/ dependencies.rb:263:in `load_missing_constant':NameError: uninitialized constant ODBC::SQL_DBMS_NAME

Is there a place to set the name of the DBMS?

Hello,

I have the same problem. My connection works with dbi connection:

irb(main):008:0> DBI.connect('dbi:ODBC:ServeurBDDSQL', 'toto', 'password') do |dbh| irb(main):009:1* dbh.select_all('select N_contrat from contrats where id_contrat = 593;') do |row| irb(main):010:2* p row irb(main):011:2> end irb(main):012:1> end ["2000005621"] => nil

the connection works with an older activerecord (1.4.2) but the connection doesn't work with activesupport (2.2.0) and occurs the error: /var/lib/gems/1.8/gems/activesupport-2.2.0/lib/active_support/dependencies.rb:428:in `load_missing_constant': uninitialized constant ODBC::SQL_DBMS_NAME (NameError)

is there an issue?? thanks