I've been following the tutorial from Oracle, using their JDBC driver with an oracle database and JRuby. I have the JRuby connector class required, and I modified some of their code. I just want to do a simple insert statement and execute it from my script. I may have to do this 10+ thousand times once this is done.
I'm using an oracle database, 11g. CentOS 7.2 x64.
This is the code I have that is doing the work:
insert_stmt = nil
conn = OracleConnection.create(@dbuser, @dbpass, @dburl)
insert_sql = <<-EOH
INSERT INTO TESTTABLE2(COLUMN1)
insert_stmt = conn.prepare_statement(insert_sql)
puts "\n** Error occured **\n"
puts "Failed executing Oracle demo from JRuby ", $!, "\n"
# We have to ensure everything is closed here.
If you're using the sample code from the link you provided, then it has
@conn.auto_commit = false somewhere in your code, and the example shows the use of
conn.commit right after the
insert_stmt.execute, so that's very likely what you need to do.
In short, add missing