Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
We don't bite newbies here... much
 
PerlMonks  

Working with CLOB

by sderosay (Novice)
on Sep 07, 2005 at 04:16 UTC ( #489764=perlquestion: print w/ replies, xml ) Need Help??
sderosay has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks!
I am attempting to extract data out of an Oracle CLOB field and insert it into an MS Access MEMO field. Here is the code snippet...
========================================== $sql5 = $gdb1->prepare("select id, clobfield from x_table where id > 0 +"); $sql5->execute(); while ( ($lid,$lclobfield) = $sql5->fetchrow_array ) { insertmdb("insert into object_att (id,memo_field) values ('$lid',' +$lclobfield')"); } ==========================================
The error I am getting is:
DBD::Oracle::st fetchrow_array failed: ORA-32255: Message 32255 not found; prod uct=RDBMS; facility=ORA (DBD: ORA-32255 error on field 2 of 2, ora_type 112) at dwf(url).pl line 2806.

Any ideas why this is happening? And how to actually do what I'm trying to do?
Cheers
Steve

Comment on Working with CLOB
Download Code
Re: Working with CLOB
by mvandenb (Beadle) on Sep 07, 2005 at 11:27 UTC
    Can you give some more details on your Oracle versions (client and database) and OS used ?
    There is a known Oracle bug related to this error message. It happens when fetching a NULL CLOB. Could that be the case ? (fixed in 8.1.5)
      Can someone tell me why this node was downvoted ?
      I tried to help in the best way I could, and still think my contribution was helpful.

      If I did something wrong, I'd like to correct my behavior in the future.
      But that's kind of hard if I don't know what to correct.

Re: Working with CLOB
by planetscape (Canon) on Sep 07, 2005 at 11:29 UTC

    Disclaimer: I am no expert in Oracle Databases, nor in accessing them via anything, much less Perl.

    A quick perusal of Google Groups, however, does suggest that perhaps null or empty CLOB values could be to blame. Could you test for that before you try to retrieve from the Oracle DB?

    HTH,

    planetscape
Re: Working with CLOB
by sderosay (Novice) on Sep 08, 2005 at 00:09 UTC
    Thanks for your responses Monks. I think I have progressed a little. I changed the query to exclude CLOB values that were null. However I do get a different error:

    DBD::Oracle::st fetchrow_array failed: ORA-01406: fetched column value was truncated (DBD: ORA-01406 error on field 2 of 2, ora_type 112) at dwf(url).pl line 2807.

    Do I need to increase buffer size in Perl?? If so, how do I do that??

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://489764]
Approved by monkfan
Front-paged by planetscape
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (13)
As of 2014-04-16 16:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (432 votes), past polls