in reply to Re^3: Perl DBI: problems inserting data to a table
in thread Perl DBI: problems inserting data to a table

For a simple insert statement, execute() should never return '0E0'. It will return undef if there's an error, or '1' if a row was inserted (though I would use RaiseError in which case it would die on error). For a 'insert into ... select ... from' type insert statement, it might return '0E0' if zero rows were selected/inserted (which is not an error), or more if rows were inserted, or (again) undef if there was an error.
  • Comment on Re^4: Perl DBI: problems inserting data to a table

Replies are listed 'Best First'.
Re^5: Perl DBI: problems inserting data to a table
by boftx (Deacon) on Nov 21, 2013 at 19:43 UTC

    The OP indicates that RaiseError is being set. The only thing I could think of was that a field width constraint was being violated without throwing the exception. At this point, I think I would want to force an insert error and see if RaiseError does in fact fire.

    It helps to remember that the primary goal is to drain the swamp even when you are hip-deep in alligators.