in reply to Oracle Insert with DBI

In your first example what exactly are you getting back from the do method - it should return the number of rows affected, -1 (not known) or undef (error). Which are you getting? Similarly in the second method, what is $stmt->rows after execute?

UPDATE: bare in mind do returns 0E0 for 0 rows affected which is TRUE but 0.

Replies are listed 'Best First'.
Re^2: Oracle Insert with DBI
by simply seth (Initiate) on Jan 12, 2010 at 17:38 UTC
    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

      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.