Home > Clob Procedure > Clob Procedure Perl Error

Clob Procedure Perl Error

But my Perl code gives me the following error.ORA-06502: PL/SQL: numeric or value errorORA-06512: at line 3 (DBD ERROR: OCIStmtExecute).DBD::Oracle::st executefailed: ORA-06502: PL/SQL: numeric or value errorThe function isCREATE OR REPLACE If I try to read the same CLOB via Perl, I'm only able to read CLOBs < 4K. ERROR: 1403 'ORA-01403: no data found (DBD ERROR: LOB refetch attempted for unsupported statement type)' <- execute= undef at tmarkup_document.pl line 101 I got the impression DBD and/or DBI Memory for necessary size # is always allocated, even if actual size is smaller. # the out params $sth1->bind_param_inout(":p_wwwhost_id", \$wwwhost_id, 11); $sth1->bind_param_inout(":p_url", \$url, 2100); $sth1->bind_param_inout(":p_date_fetched", \$date_fetched, 10); $sth1->bind_param_inout(":p_date_checked", \$date_checked, 10); $sth1->bind_param_inout(":p_date_lastmod",

Not sure if I have some "version conflict" or not. I want to ultimately read the data in chunks, then concatenate it. Just SELECT the function, and Oracle will handle the CLOB part for you. at Cisco\) Thanks a lot Philip. page

What is your DBI/DBD version? Just SELECT thefunction, and Oracle will handle the CLOB part for you.local $dbh->{LongReadLen} = 2048000; # biggest blobmy $sth = $dbh->prepare("select f_load(?,?) from dual")die $dbh->errstr;$sth->execute($id,$type)die $sth->errstr;my ($pid_str) = $sth->fetchrow;Hth,Philip reply | at Cisco\)Jul 6, 2006 at 11:11 am Hi,I am trying to read a CLOB value in Perl that is returned from an Oraclefunction.

For strings >= 32513 chars, I see the following error messages. All other Oracle DBI code is functioning quite well. I have a crude hack that accomplishes this now, but I felt the correct way was to use the DBI lob functionality. But my Perl code gives me the following error.ORA-06502: PL/SQL: numeric or value errorORA-06512: at line 3 (DBD ERROR: OCIStmtExecute).DBD::Oracle::st executefailed: ORA-06502: PL/SQL: numeric or value errorThe function isCREATE OR REPLACE

Seekers of Perl Wisdom Cool Uses for Perl Meditations PerlMonks Discussion Categorized Q&A Tutorials Obfuscated Code Perl Poetry Perl News about Information? If I do a test against a CLOB that holds a "short sentence" the FETCH WILL WORK, but it will still FAIL on the $dbh->ora_lob_read(...) ...but that may be a different my $chunksize = 1024; my $offset = 1; my $data = $dbh->ora_lob_read($char_locator, $offset, $chunksize) or die "ERROR: " . $sth->errstr . "\n"; [download] #------------------------------------------------- I pasted alot of data into this this contact form Larry Wall Shrine Buy PerlMonks Gear Offering Plate Awards Random Node Quests Craft Snippets Code Catacombs Editor Requests blogs.perl.org Perlsphere Perl Ironman Blog Perl Weekly Perl.com Perl 5 Wiki Perl Jobs

ABOVE FAILS (this is the problem I would like to solve)... ... Comments to Ask Bjørn Hansen at [email protected] | Group listing | About Perl-Sensitive Sunglasses PerlMonks Oracle DBI CLOB Issue: fetch Column TRUNCATED by Anonymous Monk LoginCreateanewuser TheMonasteryGates SuperSearch SeekersofPerlWisdom How do I resolve these errors? ------------------------------- DBD::Oracle::st execute failed: ORA-01460: unimplemented or unreasonable conversion requested (DBD ERROR: OCIStmtExecute) ------------------------------- I changed line 6 to: $sth->bind_param(":value", "$string", SQL_LONGVARCHAR ); but saw PerlMonks FAQ Guide to the Monastery What's New at PerlMonks Voting/Experience System Tutorials Reviews Library Perl FAQs Other Info Sources Find Nodes?

When I call the procedure via sqlplus, I can always sucessfully read the entire CLOB (Size variable, up to 1 MB). http://www.ibm.com/support/knowledgecenter/SSEPGG_9.7.0/com.ibm.db2.luw.apdv.sample.doc/doc/perl/s-spclient-pl.html This CLOB is created by appending VARCHAR2 values from acolumn. If I have left out any information critical to resolving this problem, please let me know. #-------------------------------------------------------------- PART 2: If you already know the answer to my question above...- #--------------------------------------------------------------- If for strings < 32512 chars, the code works fine.

at Cisco) wrote: > [snip] There's no need to use PL/SQL procedural style here. This is on a CLASSIFIED system but I will type in what I think is pertinent: #--------- VERSIONS ---------------------------- Perl: ActiveState 5.6.1 (since had issues with DBI and 5.8.3) DBI version: I am willing to admit I am a moron, :-). at Cisco)"To: Sent: Thursday, July 06, 2006 7:10 AMSubject: How to read CLOB return value of Stored Function in PerlHi,I am trying to read a CLOB value in Perl that is

Comment on Oracle DBI CLOB Issue: fetch Column TRUNCATEDSelect or Download Code Replies are listed 'Best First'. Re: Oracle DBI CLOB Issue: fetch Column TRUNCATED by helphand (Pilgrim) on Apr 09, 2006 at 20:59UTC Can't answer part 1, but on part 2, I believe the following note would Thanks in advance for yourhelp.ThanksPrakash reply | permalink Prakash Inuganti -X \(pinugant - Digital-X, Inc. bind :p_mklob done with ftype 112 out ':p_content_length' [0,0]: alen 29, piece 0 dbd_st_execute BEGIN returned (SUCCESS, rpc1, fn34, out9) ERROR EVENT 1403 'ORA-01403: no data found

This may work for older version[reply] Back to Seekers of Perl Wisdom Log In? Username: Password: remember me What's my password? Your demo has helped. --Andrew Report message to a moderator Re: help with Perl code to insert a long string (> 32512 chars) via stored procedure [message #295749 You may be right.

Senior MemberAccount Moderator If you commit in your procedure (something you should not do Oracle is not SQL server or Sybase, commit must be done ONLY in the caller) then you

As I mentioned in my post, I only had problems with strings >= 32513 chars. This CLOB is created by appending VARCHAR2 values from acolumn. Anyhelp/pointers to solve this is appreciated. So they have apparently corrected some things dealing with LOB truncation.

I guess I am missing something fundamental? Anyhelp/pointers to solve this is appreciated. This CLOB is created by appending John Scoles at Jul 6, 2006 at 11:53 am ⇧ Try binding like this$sth->bind_param_inout(":pid_str",\$pid_str, {ora_type => ORA_CLOB});read the section in the DBD::Oracle pod on Handling All I want is the Appended string from the function.I had return value as LONG but when the string becomes large, it throwsthe same error so I am using CLOB but

Just SELECT thefunction, and Oracle will handle the CLOB part for you.local $dbh->{LongReadLen} = 2048000; # biggest blobmy $sth = $dbh->prepare("select f_load(?,?) from dual")die $dbh->errstr;$sth->execute($id,$type)die $sth->errstr;my ($pid_str) = $sth->fetchrow;Hth,Philip reply | Senior MemberAccount Moderator I get the same behaviour than you using or not the LOB options. at Cisco\) (3) Garrett, Philip \(MAN-Corporate\) (1) John Scoles (1) Content Home Groups & Organizations People Users Badges Support Welcome FAQ Contact Us Translate site design / logo © 2016 Grokbase How do Isolve this problem?

It is just recently that I have needed to implement support for some CLOB datatypes. THANKS. The error I receive in this case is: Can't locate object method "ora_lob_read" via package "DBI::db" (perhaps you forgot to load "DBI::db"?) at simple.pl line 58. I am doing that.