views:

731

answers:

1

I'm working on a project that involves some scripting and data storage. The database that I have available to me is MS Sql Server and it is on a windows platform.

Despite this I'm looking to leverage Ruby to write the script, specifically JRuby. There are a couple of reasons for this

  1. I would like to leverage Prawn to create pdfs
  2. I just like Ruby
  3. JRuby and Rawr will allow me to bundle the dependencies so that I don't have to worry about having ruby on the target machine(s).

When using Matz ruby I can use 'win32ole' for easy database connectivity. However this doesn't work in JRuby for obvious reasons. What is the bast way to connect to MS Sql from JRuby/Java to perform simple Select and Update statements?

Thanks in advance.

+4  A: 

MS SQL should have a JDBC driver; use that with the JRuby-JDBC bridge: http://wiki.jruby.org/wiki/JDBC

Don Werve
Glad to help. :)
Don Werve