From: kranthi reddy Date: 2008-05-07T20:57:22+09:00 Subject: Re: Code for connecting to SQL Server? ------=_Part_22419_12376924.1210161442027 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 wrote: > Hi, > > I want to connect to my SQL Server DB through ruby code. > > Searched on the connection and was provided some steps like: > > 1. Save the latest source distribution of ruby-dbi and copy the file > ADO.rb to > X:/ruby/lib/ruby/site_ruby/1.8/DBD/ADO/ADO.rb > > 2. Then, in your database.yml, > > development: > adapter: sqlserver > database: database_name > host: server_name > username: user_name > password: pwd > > I am not able to find this file. > > Can anyone tell me for invoking sql server in SCITE editor? > > Is there any other procedure 'coz I dont have rails installed? > > Thanks, > Anukul > -- > Posted via http://www.ruby-forum.com/. > > ------=_Part_22419_12376924.1210161442027--