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

**URL:** <https://www.ruby-forum.com/t/ruby-odbc-compiled-for-windows-anything-newer-than-0-997/91778>\
**Category:** Rails\
**Created:** [April 12, 2007, 9:44am UTC](https://www.ruby-forum.com/t/ruby-odbc-compiled-for-windows-anything-newer-than-0-997/91778 "2007-04-12T09:44:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c57346/32.png) [@danielb](https://www.ruby-forum.com/u/danielb)\
**Post date:** [April 12, 2007, 9:44am UTC](https://www.ruby-forum.com/t/ruby-odbc-compiled-for-windows-anything-newer-than-0-997/91778/1 "2007-04-12T09:44:35Z")

</div>

Hey 🙂

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](http://www.ch-werner.de/rubyodbc/)), 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

---

<div class="post-metadata">

**Author:** ![danielb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c57346/32.png) [@danielb](https://www.ruby-forum.com/u/danielb)\
**Post date:** [April 12, 2007, 7:10pm UTC](https://www.ruby-forum.com/t/ruby-odbc-compiled-for-windows-anything-newer-than-0-997/91778/2 "2007-04-12T19:10:56Z")

</div>

Daniel,

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?

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.

Wes

---

<div class="post-metadata">

**Author:** ![danielb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c57346/32.png) [@danielb](https://www.ruby-forum.com/u/danielb)\
**Post date:** [April 13, 2007, 11:49am UTC](https://www.ruby-forum.com/t/ruby-odbc-compiled-for-windows-anything-newer-than-0-997/91778/3 "2007-04-13T11:49:44Z")

</div>

On Apr 12, 7:10 pm, Wes G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Daniel,

Hi Wes, thanks for replying 🙂

> 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. ☹

---

<div class="post-metadata">

**Author:** ![danielb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c57346/32.png) [@danielb](https://www.ruby-forum.com/u/danielb)\
**Post date:** [April 13, 2007, 4:35pm UTC](https://www.ruby-forum.com/t/ruby-odbc-compiled-for-windows-anything-newer-than-0-997/91778/4 "2007-04-13T16:35:22Z")

</div>

I am not using Ruby-ODBC on my Windows box at all, to the best of my  
knowledge - all I needed was the sqlserver adapter for ActiveRecord.

Wes

---

<div class="post-metadata">

**Author:** ![danielb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c57346/32.png) [@danielb](https://www.ruby-forum.com/u/danielb)\
**Post date:** [April 13, 2007, 4:37pm UTC](https://www.ruby-forum.com/t/ruby-odbc-compiled-for-windows-anything-newer-than-0-997/91778/5 "2007-04-13T16:37:39Z")

</div>

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

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

Wes

---

<div class="post-metadata">

**Author:** ![danielb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c57346/32.png) [@danielb](https://www.ruby-forum.com/u/danielb)\
**Post date:** [April 17, 2007, 2:20pm UTC](https://www.ruby-forum.com/t/ruby-odbc-compiled-for-windows-anything-newer-than-0-997/91778/6 "2007-04-17T14:20:08Z")

</div>

On Apr 13, 4:37 pm, Wes G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> 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/](http://www.ch-werner.de/)  
rubyodbc/).
