[ic] Update on CommonAdjust Usertag GDBM errors -- Still need help, PLEASE!

Barry Treahy, Jr. interchange-users@icdevgroup.org
Sat Sep 7 15:09:02 2002


Barry Treahy, Jr. 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 <<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} )
>>> >
>>>   
>>
>>
>> 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 placed the [perl tables=tiers][/perl] into the main start points of 
the site, where a session is first started, heck, even in the flypage 
itself, and the problem still exists...    Recall, this UserTag is in 
the CommonAdjust, not a page!

We've proceeded with the launch because this wasn't effecting the 
functionality of the site, as far as I can tell, but it certainly is 
making it hard for log file review...   For those curious folks, the url 
is ebiz.midwest-microwave.com.

I did not attempt the [data tables] suggestion, would you expect 
different results with that ?

I suspect that this is a problem that most do not even ses because of 
GDBM and the query.  Now that the initial site is out, we're going to 
work on the functions that missed the initial launch as well as 
converting the db's to SQL but until then, since this could take months, 
I would really appreciate a solid work-around...

Barry

-- 

Barry Treahy, Jr  *  Midwest Microwave  *  Vice President & CIO 

E-mail: Treahy@mmaz.com * Phone: 480/314-1320 * FAX: 480/661-7028