Skip to content

Instantly share code, notes, and snippets.

@enebo
enebo / oracle_prepared.rb
Created January 14, 2011 00:12
Shows how you can leverage some of Java's Java integration features. Original code from http://theblasfrompas.blogspot.com/2011/01/retrieving-dbmsoutput-from-plsql-in.html.
require 'java'
require 'C:/jdev/jdcbdrivers/11.2/ojdbc6.jar'
require 'lib/jdbc_connection'
require 'lib/dbms_output'
# v--- java_import is better than import if you end up using rake for testing
# v--- java,org,edu,javax can all be supplied bare-word instead of string form
java_import java.sql.CallableStatement
java_import java.sql.Connection