As I said, keep it on the list.

------ Forwarded message ------
From: [EMAIL PROTECTED]
Date: Wed, 27 Aug 2003 13:34:35 +0300
Subject: Re: Trying to store a file into the Oracle
To: Michael A Chase <[EMAIL PROTECTED]>

That's my code again. Ignore the connect method. It connects normally to
the 
Oracle database

----------------------------------------------
#!/usr/local/bin/perl -w

use DBI;

$dbh = DBI->connect()
                or die "Connecting : $DBI::errstr\n ";
        open(BLOB, "john.doc");
        my $blob=<BLOB>;
        close(BLOB);

        $stmt = $dbh->prepare("INSERT INTO hr.documents VALUES
('8','john.doc',?)") || die "\nPrepare error: $DBI::err .... 
                    $DBI::errstr\n";
        $dbh->{LongReadLen} = 4 * 1024 * 1024; 

    $stmt->bind_param(1, $blob, {ora_type => 113} );

   $stmt->execute() || die "\nExecute error: $DBI::err .... ";

        print STDERR "Complete.\n";
----------------------------------------------------
and here is the error message
---------------------------------------------------
DBD::Oracle::st execute failed: ORA-01465: invalid hex number (DBD: oexec
error)
 at C:/progs/dika/blob/insert_blob_test.pl line 39.

Execute error: 1465 ....  at C:/progs/dika/blob/insert_blob_test.pl line
39.
Press Enter to continue
---------------------------------------------------------

Apparently, the 113 isn't the coorect id or something else is going wrong.

Quoting Michael A Chase <[EMAIL PROTECTED]>:

> On Wed, 27 Aug 2003 09:44:07 +0300 [EMAIL PROTECTED] wrote:
> 
> Please keep this on the list, I am not the sole source of all wisdom.

-- 
Mac :})
** I usually forward private questions to the appropriate mail list. **
Ask Smarter: http://www.catb.org/~esr/faqs/smart-questions.html
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.

Reply via email to