Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Note: did not work with SQL Server, will work with Oracle, MySQL
- #require AR
- require 'rubygems'
- require 'active_record'
- # connect to the Database
- ActiveRecord:: Base.establish_connection(
- :adapter => "oracle",
- :host => "10.0.1.22",
- :database => "xe",
- :username => "prep",
- :password => "passwd"
- )
- #define a simple model
- class Outboundservice < ActiveRecord::Base
- set_table_name "PCO_OUTBOUNDSERVICE" # comment out if not using oracle
- end
- begin
- record = Outboundservice.find(:first)
- puts record.inspect
- rescue => err
- puts err
- end
Add Comment
Please, Sign In to add comment