I haven't experienced that high round-trip time before, but asking on the 
activerecord-sqlserver-adapter list would be best:
http://groups.google.com/group/rails-sqlserver-adapter.

As far as using ODBC from IronRuby, the most documented way is to download the 
.NET ODBC Driver (Microsoft.Data.ODBC.dll); simple usage from VB.NET is shown 
here: http://support.microsoft.com/kb/310985. Replacing the C code in ruby-odbc 
with IronRuby that uses this library would be fairly straight-forward. However, 
I'd suggest figuring out what is going on with your existing setup first.

~js

From: ironruby-core-boun...@rubyforge.org 
[mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of Tim Sjoberg
Sent: Monday, May 17, 2010 8:48 AM
To: ironruby-core@rubyforge.org
Subject: [Ironruby-core] IronRuby and ODBC

Hi

I'm currently running IronRuby (on Rails, in IIS7) on Windows Server 2008 
connecting to SQLServer 2008. As per the guide I am using the 
activerecord-sqlserver-adapter in ADONET mode. It is working fine except that 
it is slower than cancer itself.

I have the same website running on my Laptop (running Ubuntu Linux) connecting 
over LAN to the sqlserver database. For exactly the same page the DB time on 
the page request never goes below 1200ms in ironruby (the db is local to this 
machine), while in linux making an odbc connection, to a database database from 
a different machine, the same page gets as low as 60ms for the DB time. Now I 
don't believe that the fault lies with IronRuby itself, but rather with the db 
connector.

What I would like to know is how exactly to go about making an odbc connection 
to the database. Currently you need to use ruby-odbc, at least 
activerecord-sqlserver-adapter tries to do it, but its not pure ruby and 
requires compilation. There are precompiled versions but I have no idea where 
it is looking for them. according to the website 
(http://www.ch-werner.de/rubyodbc/) it is supposed to be in 
.../ruby/1.8/i386-msvcrt which isn't particularly helpful. i tried 
IronRuby/Lib/ruby/1.8/i386-msvcrt but unsurprisingly that didnt work.

So how exactly are other IronRubyists using databases? Are they struggling with 
deathly slow ADO, is it maybe something my side which is making it deathly 
slow, or is there a way to make an odbc connection to sqlserver? I would think 
that most people using IronRuby would want to be connecting to sqlserver, and 
not some other database.

Thanks in advance
Tim Sjoberg
_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to