sql - DBD::Oracle insert sydate instead of null -


i try insert null values date fields in oracle perl, instead of null values ends inserting sysdate. when same sqlplus, inserts null values.

my code (just important part)

use dbi; use dbd::oracle qw(ora_rset);  ...  eval {     $sth = $dbh->prepare(q{          insert my_table              (val1, val2, val3, entry_date, processed_date)          values (?,?,?,?,?)});     $rv = $sth->execute($val1, $val2, $val3, undef, undef);     $insert_counter++; }; if ( $@ ) {     $file_process_status = file_invalid;     logg("e", "$@"); } if ( $file_process_status = file_valid ) {     $dbh->commit; } 

you can use dbi->trace log actions , see statement being prepared. see answers this question. should show if incorrect sql query being created.

however, willing bet problem other think is. use debugger verify this piece of code causing problem, or create simple example script test whether problem.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -