How do I access raw Oracle OCI8 database handle?

Nate
Fri, 22 Dec 2006 22:21:52 -0000

Hi, I know about the connection() routine in ActiveRecord::Base, but
that gives you the ActiveRecord adapter, not the real OCI8 "dbh"
database handle.

I''d like to do something like this:

   class MyModel < ActiveRecord::Base
      def some_method
         dbh = connection()
         dbh.prepare("BEGIN some_procedure(?,?,?); END;")
         dbh.execute(arg1, arg2, arg3)
      end
   end

Anybody able to do this? I know it goes around ActiveRecord, but I have
a number of stored procedures I need to access (DBA''s require it for
this app)

Thanks,
Nate


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---