A
Anukul Singhal
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"
assword => "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
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"
assword => "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