in reply to Re: Oracle Insert with DBI
in thread Oracle Insert with DBI

for $stmt->rows I get 1s on some and 0s on others. when I use the do .. I get .. 1s on some and OEOs on others

Replies are listed 'Best First'.
Re^3: Oracle Insert with DBI
by mje (Curate) on Jan 12, 2010 at 17:47 UTC

    Well if you get 1 then 1 row should be updated or inserted and if you get 0E0 then no row was updated/inserted. I don't think your SQL is in error if no rows are inserted so why would you think you should get an error if no rows are inserted. If you are saying that when you see 1 in rows or from do, you do not see the update/insert in the database then I'd check you really have AutoCommit on and have not disabled it by calling begin_work.

      Yes the issue is, in fact, that my sql string seems correct,
      yet the inserts do not happen after running the script
      the database still remains empty.

      Its a very elusive issue that I cant seem to resolve.

        Are you absolutely sure you are not in a transaction? Even if you use AutoCommit in the connect call somewhere else can use begin_work to disable autocommit in a block say. You could perhaps try DBIx::Log4perl which only logs DBI method calls which would make your tracing smaller but hopefully sufficient to see whether the row should have been inserted. It should be trivial to add to your code as only the connect call will need to change.