Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Problems inserting rows #34

adolfoc opened this Issue · 2 comments

2 participants



I have Oracle Instant Client installed on a MacMini running Mountain Lion (10.8.3). I am able to create, selected and insert into tables from SQLPlus. However, using Ruby 1.9.3p327 and ruby-oci8-2.1.5, I am able to select but not insert. Insert operation returns 1 (I'm assuming that means success), an immediate select returns the row (is it cached on the client?) but the row is not effectively persisted in the database, and a subsequent select from ruby or SQLPlus returns no rows.

I've checked with Wireshark that there is data going to and coming back from the server box (Windows 7 running Oracle Server Personal Edition 11g Release 2).

Any ideas? All help will be greatly appreciated.

Best regards, Adolfo


You need to commit the transaction.

conn =, password, database)
conn.exec('insert into table_name values (:1, :2)', 'foo', 'bar')
conn.commit  # The inserted row is invisible from other connections unless the transaction is committed.

Yup, that did it. I was looking for a commit method on cursor and never found it. Thank you very much.

@adolfoc adolfoc closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.