Your DBD::Oracle is built using the Oracle7 OCI API, it doesn't
know about LOBS.

Tim.

On Thu, Nov 15, 2001 at 09:00:16PM +0000, Becka Louden wrote:
> Hi, I am new to this newsgroup, so I hope this is not a bad question.
> 
> I trying to use the Perl::DBI to insert a string value into the Oracle 
> database.  However, I get this error : "ORA-01461: can bind a LONG value 
> only for insert into a LONG column (DBD: oexec error) at query_crr.pl line 
> 98."
> Here are the pertinent parts of the script:
> 
> use strict; use DBI; use DBD::Oracle qw(:ora_types);
> 
> my $insert_cr =$dbh->prepare("UPDATE crr set crr_print_image = ? WHERE 
> crr_id = 218936");
> 
> my $cr = "A string";
> 
> $insert_cr->bind_param(1, $cr, {ora_type => ORA_CLOB});
> 
> my $result_ins = $insert_cr ->execute() || print "Insert into CRR table 
> failed!!\n";
> 
> if(!defined($result_ins)) {
> print "Insert into CRR table failed!!\n";
> } else {
> print "Insert into CRR table result: $result_ins\n";
> }
> 
> The execute fails, and the script prints "Insert into CRR table failed!!
> Insert into CRR table result: 1".
> 
> I have also tried to use:
> $insert_cr->bind_param(1, $cr, SQL_WLONGVARCHAR); (with :sql_types- same 
> error)
> and
> $insert_cr->bind_param(1, $cr, -9112); #this one errors out saying it is not 
> fully supported.
> 
> Can anyone recommend a way to write a string into a CLOB field through Perl, 
> or tell me what I did wrong?
> 
> Thanks!!
> Becka Louden
> Collect America
> 
> 
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
> 

Reply via email to