Created
November 22, 2008 21:52
-
-
Save alcabanillas-engh/27950 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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", | |
:database => "172.30.10.140/xe", | |
:username => "prep", | |
:password => "pass" | |
) | |
#define a simple model | |
class PcoOutboundqueue < ActiveRecord::Base | |
set_table_name "PCO_OUTBOUNDQUEUE" # comment out if not using oracle | |
end | |
begin | |
record=PcoOutboundqueue.find(:first) | |
puts record.inspect | |
rescue => err | |
puts err | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment