From: Anukul Singhal Date: 2008-05-07T21:23:35+09:00 Subject: Re: Code for connecting to SQL Server? kranthi reddy wrote: > Hey, > Do you want to invoke the sql using ruby code or ruby on rails.... > If its just ruby then you u can go a head like this: > > require 'mysql' > mysql = Mysql.init() > mysql.connect('localhost','USERNAME','PASSWORD') > mysql.select_db(' DATABASE NAME') > and proceed with the rest of the operations as required . > > If its in Ruby on rails then you can configure your database.yml file > > cheers, > krantih > > > > > > > On Wed, May 7, 2008 at 4:48 PM, Anukul Singhal > Hi, Thanks for the info. My basic aim is to connect to SQL Server 2005 through Ruby without using rails. Can you help in providing a code snippet for connecting to it? Thanks, Anukul -- Posted via http://www.ruby-forum.com/.