Execute a stub written in plsql

  • Thread starter Bharath Khambadkone
  • Start date
B

Bharath Khambadkone

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,235
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top