Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Submitting file to Oracle via DBI

Submitting file to Oracle via DBI

From: Herlitz, Kirk (EXCHANGE:RICH2:2K29) <kherlitz_at_americasm01.nt.com>
Date: Mon, 15 Nov 1999 16:25:31 -0600
Message-ID: <3830885B.7DC90E24@americasm01.nt.com>


Below you'll find a subroutine from a script that I'm writing to submit a file and its related information into a table in Oracle. The field that I'm having problems with is the one where the file is to be stored.

The field is defined as a LONG in the table and the file is only 164 kilobytes, so the size isn't the problem, but when I try to submit it, I get this error:



DBD::Oracle::st execute failed: ORA-01401: inserted value too large for column (DBD: oexec error) at /bnr/mtx/bin/crimsondir/crimsonadmin/CDB.pm line 64, <CTRAK> chunk 3101.

The line it's referring to is the line where the statement gets executed - I've denoted it with a comment below.

Can anyone help me with this problem? I've tried a lot of things, but nothing seems to work! I can submit smaller files, so what's the deal?

Any information would be greatly appreciated. If you reply, please copy my email as well.

Thanks,

Kirk


sub submitCtrakFileToDB
  {
    my $self = shift(); # First parameter when dealing with objects is always

                        # an object reference.
    my $ctrakinfo = shift(); # CtrakInfo object
    my $filename = shift();
    my $rval = 0;

    my $sql = qq{INSERT INTO CRIMSON VALUES ('$ctrakinfo->{stream}','$ctrakinfo->{context}','$ctrakinfo->{cpu}','$ctrakinfo->{category}','$ctrakinfo->{calltrak_name}','$ctrakinfo->{description}','$ctrakinfo->{author}', ? ,'$ctrakinfo->{calltrak_filename}')};     

    my $sth = $dbh->prepare($sql) || die $main::sth->errstr;

$ctrakinfo->dumpInfo();

$sth->bind_param(1, $ctrakinfo->{calltrak_file}, {TYPE => ORA_LONG})
|| die $sth->errstr;

#line 64 follows:

$rval = $sth->execute();
    

    if ($rval > 0)

      {
	print("The calltrak info for '$ctrakinfo->{calltrak_filename}' was
successfully submitted to the\nCrimson database.\n");
      }

  }

--
Kirk Herlitz
MTX Design Productivity Tools Team
(972) 685-5833 (ESN 445-5833)
kherlitz_at_nortelnetworks.com Received on Mon Nov 15 1999 - 16:25:31 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US