RE: LongReadLen issue
- From: ctantalo@xxxxxxxxxxx (Christopher G Tantalo)
- Date: Thu, 26 May 2005 10:27:31 -0400
I am not totally sure that is the issue. Using sqlplus and TOAD to just
do the simple select
SELECT MAX(mc.MC_LONG_DESCRIPTION)
FROM dmg.MAINT_CODES mc
comes back with inconsistent datatypes.
BTW, the I pulled the dbh statement from perldoc DBI under the
LongReadLen section.
-----------------------------------------------
Just Your Friendly Neighborhood
_SPIDEY_
________________________________
From: Chuck Fox [mailto:ChuckFox2@xxxxxxx]
Sent: Thursday, May 26, 2005 10:12 AM
To: Tantalo, Christopher G; dbi-users@xxxxxxxx
Subject: Re: LongReadLen issue
Chris,
The methods you are using are attempting to store an array into
an int.
You need to get the value out of the first element of the array
and back into an int.
Something like $dbh->{LongReadLen} = @{ $dbh->selectrow_array(
..... ) }[0];
Untested code, YMMV.
Tantalo, Christopher G wrote on 5/26/2005, 9:58 AM:
I am trying to set the LongReadLen value of $dbh
dynamically to select a CLOB, using:
$dbh->{LongReadLen} = $dbh->selectrow_array(qq{
SELECT MAX(mc.mc_long_description)
FROM dmg.maint_codes mc
});
but get this error
DBD::Oracle::db selectrow_array failed: ORA-00932:
inconsistent datatypes (DBD ERROR: OCIStmtExecute/Describe) at
eleadtest.pl line 27.
Then, I noticed a different version of the above:
$dbh->{LongReadLen} = $dbh->selectrow_array(qq{
SELECT MAX(OCTET_LENGTH(mc.mc_long_description))
FROM dmg.maint_codes mc
});
but get this error
DBD::Oracle::db selectrow_array failed: ORA-00904:
invalid column name (DBD ERROR: OCIStmtExecute/Describe) at eleadtest.pl
line 27.
(Yes the spellings are correct)
If I set $dbh->{LongReadLen} = 70000;
that works fine, but I would like this to be dynamic so
the memory is not too small, or too big.
Thanks in advance,
Chris
-----------------------------------------------
Just Your Friendly Neighborhood
_SPIDEY_
--
Your Friendly Neighborhood DBA,
Chuck
-----------------------------------------
The information contained in this message may be privileged,
confidential, and protected from disclosure. If the reader of this
message is not the intended recipient, or any employee or agent
responsible for delivering this message to the intended recipient, you
are hereby notified that any dissemination, distribution, or copying of
this communication is strictly prohibited. If you have received this
communication in error, please notify us immediately by replying to the
message and deleting it from your computer.
Thank you. Paychex, Inc.
- Follow-Ups:
- RE: LongReadLen issue
- From: Jared Still
- RE: LongReadLen issue
- Prev by Date: RE: How to store query results in an array?
- Next by Date: RE: How to store query results in an array?
- Previous by thread: LongReadLen issue
- Next by thread: RE: LongReadLen issue
- Index(es):
Relevant Pages
|