From: Anukul Singhal Date: 2008-05-09T00:16:08+09:00 Subject: Writing a SQL Query in Active Record? Hi, I am using the following code snippet for connecting to SQL Server through Active Record: require 'rubygems' require 'active_record' ActiveRecord::Base.establish_connection( :adapter => "sqlserver", :host => "xxx.xxx.xxx.xxx,8080" :username => "username" :password => "password" :database => "xyz_1008" ) Now, I want to execute a query in this sql server after getting successfully connected but am not aware how to do so. Can anyone give an example as to how we write the query say ("Select * from Name") after establishing the above connection successfully? Thanks, Anukul -- Posted via http://www.ruby-forum.com/.