TJRandall has asked for the wisdom of the Perl Monks concerning the following question:
When executed, I get: DBD::Oracle::db prepare failed: ORA-24373: invalid length specified for statement (DBD ERROR: OCIStmtPrepare) at C:\Tronweb\TW_AUTOMATED_BUILDS\scripts\release_cvs_to_dev.pl line 261. This file that I'm trying to prepare is small, and I've even set up my Oracle session as:# load file contents open (FILEDATA, "$sql"); while ($record = <FILEDATA>) { print $record; } close(FILEDATA); # prepare the stored procedure if ($sth = $DBH->prepare( $record )){ # execute the stored procedure if ($sth->execute()){ print $LOG "it made it: $HoH{$filename {'full_filename'} \n"; + $HoH{$filename}{'build_state'} = 'COMPILED'; } else { # update the hash, since we will not be loading this one print $LOG "couldnt excute: $HoH{$filename {'full_filename'} \n"; + $HoH{$filename}{'build_state'} = 'FAILED - COULD NOT EXECUTE'; + } } else { # update the hash, since we will not be loading this one print $LOG "couldnt prepare: $HoH{$filename {'full_filename'} \n"; + $HoH{$filename}{'build_state'} = 'FAILED - COULD NOT PREPARE'; } # preparing sql
Do you have any suggestions for this dilemma? THANK YOU for any advice / direction that you can provide!#Open an Oracle session $DBH = DBI->connect( "dbi:Oracle:$sid", $usr, $pwd ) or die "Unable to connect to $sid: $DBI::errstr"; $DBH->{RaiseError} = 1; $DBH->{LongReadLen} = 5242880; $DBH->{LongTruncOk} = 0;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Passing a file into DBD-Oracle
by roboticus (Chancellor) on Feb 11, 2011 at 20:46 UTC | |
by bart (Canon) on Feb 11, 2011 at 21:29 UTC | |
by TJRandall (Sexton) on Feb 11, 2011 at 22:07 UTC | |
by bart (Canon) on Feb 11, 2011 at 22:54 UTC |