[Wtr-general] How do I connect to MS SQL 2005 using Ruby?

Nathan forum-watir-users at openqa.org
Wed Feb 7 09:50:09 EST 2007


Thank you so much.  I didn't think of just require "odbc".  Now I need to get my db into MSSQL and try it out.  I'm not testing the database, but rather using it to store results of tests.  It was just a requirement from one of our lead developers who wanted some performance tests for our website with Watir.  We already have a MySQL version going, but I didn't see an obvious MSSQL adapter anywhere in Ruby, and not in the docs that are installed with Ruby on Windows.  ODBC I know about from developing in Java with JDBC, but whenever they wanted to switch over to Microsoft databases we needed to use ODBC to connect (using Administrative Tools > Data Sources).  Hopefully this will answer my question, and hopefully there will not be a lot to change.

As far as Active Record goes, I'm not against it as long as I don't need to be running any extra servers (like WeBrick). I'm running my scripts on minimalistic WinXP VM images, and they can't handle a lot, nor should they need to, PLUS our website is very media heavy, which slows things down anyway. So I need a solution that behaves similarly to the MySQL gem.  The obvious, an ODBC gem, doesn't seem to exist, but now I know that ODBC is part of Ruby (for Windows at least).

Nathan
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6445&messageID=18304#18304


More information about the Wtr-general mailing list