
May 7th, 2009, 12:15 AM
|
|
Contributing User
|
|
Join Date: May 2002
Posts: 32
Time spent in forums: 1 h 54 m 2 sec
Reputation Power: 12
|
|
|
MS SQL, Ruby, and IP Addresses!
Heya,
I had the misfortune of stumbling upon a job that involved MSSQL databases recently, and while I've managed using PHP, I've come to need a portion where I'd rather use Ruby. I did a google search on this and found a post with the following solution on this very board:
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}
While I can fill in the db name, db username, and db password from that little section, I'm unsure how to tell it where the server is. I have an IP address to connect to the windows machine with the server. Where would I put that IP address for the host?
Thanks a lot!
|