|
|
sybperl-l Archive
Up Prev Next
From: "Lin, Arthur" <arthur at lehman dot com>
Subject: RE: What does this error mean?
Date: Nov 23 2005 6:45PM
Mike, How are you?
Yes, You point to the correct place in CTLib.pm it complains.
Here is the piece of the code which blows.
my @bookgroup = $DBH->ct_sql("
select book_group=rtrim(book_group) from pl_dms_book_name
", undef, CS_TRUE);
die "\tselect book_group failed\n" if ($DBH->{RC} == CS_FAIL);
thanks in advance.
Regards,
Arthur
-----Original Message-----
From: Michael Peppler [mailto:mpeppler@peppler.org]
Sent: Wednesday, November 23, 2005 11:57 AM
To: Lin, Arthur
Cc: sybperl-l@peppler.org
Subject: Re: What does this error mean?
On Wed, 2005-11-23 at 10:49 -0500, Lin, Arthur wrote:
>
> All of a sudden I'm getting this error on my server.
> Please let me know what the cause to this type of error then I can
> bark at right tree. Thanks in advance. And happy holiday to every
> body !!!
>
> Can't coerce array into hash at
> /opt/perl-5.6.1/lib/site_perl/5.6.1/sun4-solaris
> /Sybase/CTlib.pm line 932.
It would appear to come from this code:
while ($data = $db->ct_fetch($flag, 1)) {
if (defined $sub) {
if($flag) {
&$sub(%$data);
} else {
&$sub(@$data);
}
} else {
if($flag) {
push(@res, {%$data}); # <---- here??
} else {
push(@res, [@$data]);
}
}
in the ct_sql() function. My guess is that there is some confusion
internally in perl here, maybe because the $data value doesn't have an
even number of elements?
It would help to see the query that generates this, and the source perl
code maybe, and ideally some output...
Michael
--
Michael Peppler - mpeppler@peppler.org - http://www.peppler.org/
Sybase DBA/Developer - TeamSybase: http://www.teamsybase.com/ Sybase on
Linux FAQ: http://www.peppler.org/FAQ/linux.html
------------------------------------------------------------------------------
This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice.
--------
IRS Circular 230 Disclosure:
Please be advised that any discussion of U.S. tax matters contained within this communication (including any attachments) is not intended or written to be used and cannot be used for the purpose of (i) avoiding U.S. tax related penalties or (ii) promoting, marketing or recommending to another party any transaction or matter addressed herein.
|