Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: DBI Oracle error LongReadLen too small

by Rhose (Priest)
on Nov 14, 2001 at 04:00 UTC ( #125176=note: print w/replies, xml ) Need Help??


in reply to DBI Oracle error LongReadLen too small

I played with this and could not get it to fail -- I was not sure if a long (length) CHAR would trigger the error. Either it does not, or the fact I am using Oracle 8 is masking it.

Oracle version: 8.1.7.2

Play table used:

CREATE TABLE junk_table ( short_field CHAR(10), long_field CHAR(100), junk_number NUMBER );

Since my queries worked correctly, I am going to make some assumptions (I know, bad *smiles*) and offer some thing which might help.

First off, it looks like you have RaiseError => 1 (True) in your DBI->connect. This is not a bad thing, but causes your program to terminate on the error; the error, I believe, is in your "while (@data = $handle->fetchrow_array())" statement (more specifically, fetchrow_array.) This raises an error because a column being returned exceeds LongReadLen and you have LongTruncOk set to 0 (False). To find out more information on these, I used perldoc DBI. (A lot to read there.)

Anyway, increasing the size of LongReadLen will consume additional memory, but should have the benefit of actually letting your script run. *Grins*

If you would like to post more of your code, I will gladly look at it.

Also, I would like to thank you. I had never read a lot of the "extra" setting for DBI, and now have some new things with which to play -- like ChopBlanks.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://125176]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2019-08-21 05:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?