Ruby-ODBC compiled for Windows... Anything newer than 0.997?

Hey :slight_smile:

We're doing this large project, based on a legacy MSSQL database. We've had some issues, particularly with datetimes, when communicating with the server. These issues dissapeared after updating our ruby-odbc package to a new version (we're developing on Linux and MacOS X, and connecting to the remote MSSQL server via FreeTDS and UnixODBC/iODBC, and then ruby-odbc in Ruby).

Problem is, when we run the application on the production server which runs Windows, the problems remain. AFAICT, the ruby-odbc drivers are installed alongside Ruby using the One-Click Installer, which we did use. Only thing about this is, that according to the author of ruby- odbc (ODBC Binding for Ruby), the latest version compiled for Win32 is 0.997, which is from 2005. And the problems we experienced disappeared somewhere between versions 0.999 and 0.9994.

Does anybody know of a newer build for Win32?

Thanks in advance,

Daniel

Daniel,

Hi Wes, thanks for replying :slight_smile:

I develop on Windows and use the ruby-odbc/unix-odbc/tsql/freetds combo on my production Linux box.

Why aren't you just creating ODBC data sources in Windows and specifying them in your database.yml file?

Actually, I am - I mean, I create a DSN and specify that in the database.yml file, like: production:   adapter: sqlserver   mode: ODBC   dsn: polybookdsn   username: sa   password:   convert_numeric_literals: true

This is a valid setup on both the Linux and OS X machines with FreeTDS - UnixODBC/iODBC - ruby_odbc, and on Windows with a regularly created DSN and the ruby_odbc from the One-Click Installer.

It never even occurred to me to attempt to compile all that ruby-odbc stuff on my Windows box. To the best of my knowledge, the SQL Server adapter has it's ODBC mode that you can use to take advantage of Windows specified ODBC data sources.

Well, given that it's provided with Ruby pre-compiled, you don't have to compile it yourself. Except, of course, when we run into these errors (which interestingly enough seem to happen only with legacy tables, and not with those created by Rails nor with data from stored procedures). Similar errors existed on our previous Linux setup with an older ruby-odbc, and disappeared after upgrading, which is why I'm assuming that an upgrade on the Windows version would solve the problems, too. But there's only this old version available. :frowning:

OK, sorry - you're saying that it's in the Ruby distribution. Where is the ruby-odbc on Windows that you guys see?

Not sure...

I did a global search on my Ruby directory for *odbc* and found nothing.

Same here on my Linux box where I manually compiled and installed ruby- odbc. You can check the website for details (http://www.ch-werner.de/ rubyodbc/).