Israel T. wrote in post #1075534:
> Hi,
>
> I have an ODBC (sql server 2005) connection but recently I needed to
> reconfigure the odbc to connect to another sql server, not the local
> one.
>
> Since then rubi cannot establish connection thru ODBC. If I reconfigure
> the ODBC connection back to the local server it works fine.
>
> Any idea what went wrong?
>
> Thanks
>
> Code:
>
> def fetch(query)
>     ODBC::connect('odbc', 'user', 'password') do |dbc|
>       stmt = dbc.run(query)
>       result_set = []
>       stmt.each do |row|
>         result_set << row
>       end
>       result_set
>     end
>   end

Do you have odbc resource defined in odbc connections.

I use tiny_tds https://github.com/rails-sqlserver/tiny_tds since it 
doesn't require any other local settings. And it works without problems 
on Linux and Windows.

by
TheR

-- 
Posted via http://www.ruby-forum.com/.