Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Execute a stub written in plsql

4 views
Skip to first unread message

Bharath Khambadkone

unread,
Feb 26, 2010, 11:04:33 AM2/26/10
to
Hello All,
how can I use ruby to execute a block of plsql code?
The sql that I'm trying to execute is inside a .sql file
here is what I've tried so far and it does not work.
What is the right way to get this working so that I can capture the dbms
output to a variable?

require "rubygems"
require "ruby-plsql"

sql = s = IO.read('my_sql_stub.sql')
plsql.connection = OCI8.new("user","pass","db")
plsql.execute(sql)


Thanks in advance for your help.
--
Posted via http://www.ruby-forum.com/.

0 new messages