From: Damjan Rems Date: 2010-08-06T21:36:28+09:00 Subject: Re: Connecting to SQL Server 2005 Parul Korea wrote: > I need to connect to SQL server 2005 using Ruby. I went through some > posts but did not found much help. > It would be great if anyone can help me with this. ODBC is the way. Linux: Search for "odbc freetds ruby mssql" in google. Windows: I use DBI with ODBC support. Should not be trouble searching on google. Here is something to start from. require 'dbi' dbh = DBI.connect('DBI:ODBC:Driver={SQL Server}; Server=MYSQL2005;Database=mydb;Uid=myusr;Pwd=mypwd') dbh.select_all("select * from some_table") do |r| somefield = r[2].downcase end dbh.disconnect by TheR -- Posted via http://www.ruby-forum.com/.