
October 29th, 2007, 08:17 AM
|
|
Contributing User
|
|
Join Date: Nov 2003
Location: Edinburgh, UK
Posts: 84
Time spent in forums: 12 h 17 m 22 sec
Reputation Power: 10
|
|
actually answered some of my own question already with this:
Code:
require 'dbi'
oConn = DBI.connect('DBI:ADO:Provider=SQLNCLI;Data Source="YOUR_DB_NAME";User ID="YOUR_DB_USERNAME";password="YOUR_DB_PASSWORD"')
oConn.select_all('YOUR_SQL_STATEMENT'){|row| puts row}
This will print everything on the screen in quite a messy way, everything is put on a new line - which is my next task
Any comments greatly appreciated - I have a feeling that Ruby and MS SQL is pretty much not used at the moment together, something I will assume changing when IronRuby debuts...
|