I have a stored Procedure like

package StoredProcedures ;
#use strict;
use DBI;
use DBD::Oracle qw(:ora_types );
my ($key,@row,$dbh,$rv,$stmt);

sub InsertBCOBills {
        
my($rampii,$rampii_iss_date,$baid,$baid_iss_date,$complex,$document)=@_;
        eval {
          $stmt = $dbh->prepare(qq{
          BEGIN
              StoredProcedure.InsertBCOBills_sp(:1,:2,:3,:4,:5,:6);
          END;
          }) or die db_error("Statement Preparation for InsertBCOBills
fails"); 

          $stmt->bind_param(1,$rampii);
          $stmt->bind_param(2,$rampii_iss_date);
          $stmt->bind_param(3,$baid);
          $stmt->bind_param(4,$baid_iss_date);
          $stmt->bind_param(5,$complex);
        
$stmt->bind_param(6,$document,{ora_type=>ORA_CLOB,ora_field=>'xmlbillobject'
});
          $stmt->execute;
          $dbh->commit();
        };
        if($@){
          warn "Execution of Stored Procedure InsertBCOBills fails
$dbh->errstr";
          $dbh->rollback;
        }
        $stmt->finish;
}

In my oracle database the stored procedure is like

create or replace PACKAGE StoredProcedure IS
    PROCEDURE InsertBCOBills_sp(p_RAMPII IN Number, p_RAMPIIBillIssueDate IN
Date, p_BAID IN Number, p_BAIDBillIssueDate IN date, p_complex IN char,
p_XMLObject IN CLOB);
END;
PROCEDURE InsertBCOBills_sp(p_RAMPII IN Number, p_RAMPIIBillIssueDate IN
Date, p_BAID IN Number, p_BAIDBillIssueDate IN date, p_complex IN char,
p_XMLObject IN CLOB)
        IS
        err EXCEPTION;
        status Number;
        BEGIN
        Insert into BCOBills values(p_RAMPII, p_RAMPIIBillIssuedate, p_BAID,
p_BAIDBillIssueDate, p_complex,                         p_XMLObject);
        status:=SQLCODE;
        IF SQLCODE NOT LIKE 0 then
        raise err;
        END IF;
        EXCEPTION
        when err then
        dbms_output.put_line(SQLERRM(status));
        END;


When i invoke the subroutine  InsertBCOBills,it says
        DBD::Oracle::st execute failed:  (DBD ERROR: LOB refetch attempted
for unsupported statement type).What could be the problem?

This works fine when i give insert statement directly.

Thanks in advance.

Senthil Kumar
3rd Floor,27,Whites Rd
ph #  044 - 8529917/8526917 x : 3791

This e-mail and any files transmitted with it are for the sole use of the intended 
recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply e-mail and 
destroy all copies of the original message. 
Any unauthorised review, use, disclosure, dissemination, forwarding, printing or 
copying of this email or any action taken in reliance on this e-mail is strictly 
prohibited and may be unlawful.

                Visit us at http://www.cognizant.com

Reply via email to