Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #require AR
- require 'rubygems'
- require 'active_record'
- # connect to the Database
- ActiveRecord:: Base.establish_connection(
- :adapter => "oracle",
- :database => "192.168.10.3/orapr1",
- :username => "prep",
- :password => "prep"
- )
- #define a simple model
- class EchiRecord < ActiveRecord::Base
- set_table_name "PCO_ECHIRECORD" # comment out if not using oracle
- end
- begin
- record=EchiRecord.find(:first)
- puts record.inspect
- rescue => err
- puts err
- end
Add Comment
Please, Sign In to add comment