You might want to set the DB handles "LongReadLen" attribute to a higher
values say 100 meg like this
dbh->{LongReadLen} = 100*1024*1024
and then give it a try,
That might work for you.
Cheers John Scoles
John Scoles wrote:
It could be in perl but if this is the case I would need the exact
procedure, schema, some data and the exact perl code that calls it.
However to start please set the dbh->debug(6) before you call your
code and send me the results. There might be
a var that Perl is croaking on and this is one way to see where it dies.
Again I do not hold out much hope for this as it is a Oracle error
that is being returned not a DBI/DBD one.
I would also need the name of and version your OS, perl, DBI,
DBD::Oracle, The Oracle client you are running and the Oracle DB itself
cheers
John Scoles
Pompiliu wrote:
Thanks a lot John.
The problem is that this is a company code and data,
and I would have to go through 'legal' or get cover
from a director or higher to show them outside; great,
huh? -- insert heavy sarcasm here ;-)
I found what the error means though this does not help
because:
(a) Calling that particular package from sqlplus works
fine and I get lots more rows in the output.
(b) The problem shows in the perl code.
The perl code is written in the usual/generic way (see
the examples in CPAN and elsewhere). Basically I do a
connect, $dbh->func(1000000000, 'dbms_output_enable');
prepare (with a string containing a call to a PL/SQL
package), bind params (2 of them), execute, and then
start getting results with dbms_output_get (which is
simply DBMS_OUTPUT.GET_LINE underneath, according to
the doc).
I used DBI quite a bit before running
selects/inserts/updates (simple SQL) with DB2 and
Oracle, and it worked like a charm in all cases.
Pompiliu
--- John Scoles <[EMAIL PROTECTED]> wrote:
Ah yes the APPLE][ error for those of us who are old
enough to remember those things
here is what the error code means
*ORA-06502:* PL/SQL: numeric or value error
/string/
*Cause:* An arithmetic, numeric, string,
conversion, or constraint error occurred. For example, this error
occurs if an
attempt is made to assign the value NULL to a variable declared NOT
NULL, or if an attempt is made to assign an integer larger than 99 to a
variable declared NUMBER(2).
*Action:* Change the data, how it is manipulated,
or how it is declared so that values do not violate constraints.
So I would first have a look at your data looks like
there is something in the PSQL of the packge dbms_output_get that is
giving you the error. In this case DBI and DBD::Oracle are simply
working as they should returning an error message from the database.
cheers
John Scoles
Pompiliu wrote:
Hi,
I am running DBI and Oracle DB; I am executing a
package and using $dbh->func('dbms_output_get') as in
my $row;
while (($row = $dbh->func('dbms_output_get')))
{
print "$row\n";
}
if ($sth->err) {
print STDERR "ERROR: $DBI::errstr";
}
to pull the output; I did set $dbh->func(1000000000,
'dbms_output_enable');
right after connect.
The problem is that I am getting only part of the
result and the error I am getting is ORA 06502.
Everything works fine up to here. How can I fix
this?
Please email.
Thanks. P
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
____________________________________________________________________________________
Looking for last minute shopping deals? Find them fast with Yahoo!
Search.
http://tools.search.yahoo.com/newsearch/category.php?category=shopping