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

Home -> Community -> Usenet -> c.d.o.misc -> Re: long fields in oracle 7.3.2

Re: long fields in oracle 7.3.2

From: Fred Ruffet <fruffet_at_kaptech.com>
Date: Tue, 8 Jun 1999 11:00:18 +0200
Message-ID: <7jim3d$o24$1@gatekeeper.ornano.kapt.com>

Pickslay ; Christopher a écrit dans le message <928811540.907_at_www.remarq.com>...
>I'm using DBI 1.07 to write a very long string to a LONG
>field in Oracle 7.3.2

DBI ? Perl ?

>However, I keep getting the following error:
> ORA-01704: string literal too long

If you really use perl, use this :

$insert="insert into TABLE (key,LONG_FIELD) values (:1,:2)";

 $sth = $dbh->prepare($insert) || html_die($dbh->errstr);
 $attrib{'ora_type'}=24; # Type 24 = long raw / use 8 for a long
 $sth->bind_param(1,$_[1]) || html_die($dbh->errstr);
 $sth->bind_param(2,$data,\%attrib) || html_die($dbh->errstr);
 $sth->execute || html_die($dbh->errstr);
 $sth->finish;

query will no more be constructed in a string, and... this will work !

hope this will help,

Fred Received on Tue Jun 08 1999 - 04:00:18 CDT

Original text of this message

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