From: Vani Kulkarni Date: 2007-07-30T21:11:12+09:00 Subject: Connection String to MS SQL Server 2005 Hello all, I have been to trying to connect to SQL Server 2005 from ruby code. Following is the code written: ------------------------------------------------------------------------------ require 'dbi' driver = 'ODBC' server = "PRODSK0322" database = 'TestDB' user = 'sa' password = 'Sa123' connection_string = "DBI:ODBC:Driver={SQL Server};Server=#{server};Database=#{database};Uid=#{user};Pwd=#{password}" begin # connect db = DBI.connect(connection_string, user, password) # get data and print row = db.select_one("SELECT TrnEmployees") puts "result: " + row[0].to_s rescue DBI::DatabaseError => e puts "Error #{e.errstr}" ensure # disconnect from server db.disconnect if db end ------------------------------------------------------------------------------ I am getting an error saying : "Error IM002 (0) [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified" Can any one tell me where I am going wrong? Is there anything I need to install or am I missing anything in includes or requires? Thanks, Vani -- Posted via http://www.ruby-forum.com/.