[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Update on CommonAdjust Usertag GDBM errors -- Stillneed help, PLEASE!
At 11:14 AM 9/11/2002 -0700, you wrote:
>mike@perusion.com wrote:
>
>>Quoting Barry Treahy, Jr. (Treahy@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 <>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} )
>>> >
>>
>>If it is a catalog UserTag, That will *absolutely* happen unless you
>>have opened tiers prior to that usertag call. [perl tables=tiers][/perl]
>>will do it, or [data table=tiers col=junk key=junk], even.
>
>I thought I had sent out a message regarding this and that the
>prescription did not
>heal the patient, but I could not find it in my outbox nor in my
>Interchange folder.
>
>I placed the perl tables=tiers][/perl] tag in numerous key spots where
>sessions first start, and the errors persist. I even attempted to place
>it in the flypage itself and there was no resolution...
>
>Is there something I can do to IC code during the program startup to load
>that package?
Barry, the best way to get additional help on this issue would be to reduce
it to the very simplest description possible:
Environment: GDBM Database
Configuration:
* CommonAdjust calls usertag [tiers].
* [tiers] calls db->query() on "tiers" table.
Symptom:
* [item-price] works fine on every page except flypage.
* On the flypage, [item-price] works fine, but generates this error:
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.
Attempted Solutions:
* Placing [perl tables="tiers"][/perl] in front of [item-price]
doesn't alleviate the issue.
I don't particularly have any advice for you, except that if you make
[tiers] a global usertag, you'll probably short-circuit the problem, but I
would rather see a better solution.
/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\
| Dan Browning, Kavod Technologies <dan.browning@kavod.com> |
| (360) 882-7872 x7, 6700 NE 162nd Ave, Suite 210, Vancouver, WA |
\~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/
/earth is 98% full ... please delete anyone you can.