[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Update on CommonAdjust Usertag GDBM errors -- Still need help, PLEASE!
- Subject: [ic] Update on CommonAdjust Usertag GDBM errors -- Still need help, PLEASE!
- From: interchange-users@icdevgroup.org (Barry Treahy, Jr.)
- Date: Fri Sep 6 14:43:01 2002
- References: <000101c2554f$56678f40$020110ac@majestic.cursor-software.co.uk> <3D7817A1.3040504@MMaz.com>
Barry Treahy, Jr. wrote:
> Kevin Walsh wrote:
>
>>>#
>>># Original
>>># my ($results,$colname_hashref,$colname_arrayref) = $Tag->query({
>>>wantarray =>1,sql => $sql, } );
>>># still use simplied version as easier on eyes, still works, and
>>>didn't stop the errors...
>>> my $results = $Tag->query({ wantarray => 1,sql => $sql } );
>>># This variation worked but produced the same error, different module
>>># my $db = ::database_exists_ref('tiers') or die 'Missing tiers table';
>>># my $results = $db->query({sql => $sql});
>>>
>>>
>>>
>>
>>I use ::database_exists_ref($tablename), followed by $db->query($somesql)
>>all the time in my tags, but never use GDBM tables.
>>
>>I think you should break down your tag into bite-sized chunks and
>>test them separately. For instance, test the $db->query() in a
>>test tag of its own, then test the other parts and finally put it
>>all together.
>>
>>
I've taken the suggestion and reduced the tag down to:
UserTag tier_pricing_test Order sku quantity
UserTag tier_pricing_test Routine <<EOR
sub
{
my $return;
$Tag->iclog("tier_pricing_test: Startup");
my $sql = "select quantity,discount from tiers where tier='T2' order
by code desc";
my $results = $Tag->query({ wantarray => 1,sql => $sql } );
return 12345.67;
}
EOR
but the basic results are the same:
w2k.mmaz.com iaTMBiMb:mmaz.com - [06/September/2002:14:21:32 -0400]
mmb2c /cgi-bin/mmb2c/ATT-298F-06-SMA-02.html Safe: Can't locate object
method "query" via package "Vend::Table::GDBM" (perhaps you forgot to
load "Vend::Table::GDBM"?) at /
ibin/interchange/lib/Vend/Interpolate.pm line 5235.
>
> $Tag->tier_pricing_test( $item->{code}, $item->{quantity} )
>
Kevin did state that he uses the db->query, so I replaced the Tag->query
with:
my $db = ::database_exists_ref('tiers') or die 'Missing tiers table';
my $results = $db->query({sql => $sql});
but the results returned only differed slighty:
w2k.mmaz.com iaTMBiMb:mmaz.com - [06/September/2002:14:27:27 -0400]
mmb2c /cgi-bin/mmb2c/ATT-298F-06-HEX-02.html Safe: Can't locate object
method "open_table" via package "Vend::Table::GDBM" (perhaps you forgot
to load "Vend::Table::GDBM"?)
at /ibin/interchange/lib/Vend/Data.pm line 910.
>
> $Tag->tier_pricing_test( $item->{code}, $item->{quantity} )
>
For what it is worth, I have isolated it to the fact that this ONLY
occurs with the flypage which I find very odd... I further isolated it
down to the [item-price] tag in the flypage, if I remove that, all of
the errors go away but obviously, that is not a solution...
It sounds like to me that there is a problem somewhere in IC, can I get
some help here from the experts? Racke? Mike? Anyone?
Barry