NetTalk Central

Author Topic: Killer filter  (Read 1515 times)

rainerwallenius

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
    • Email
Killer filter
« on: October 27, 2013, 10:11:51 AM »
Hi,

I have been fighting with this for several days. Now even sure this is a NetTalk-problem but I can not
repeat this with a traditional Clarion app...
I have a TPS table with some 3800 payments.

I have a NetWebBrowse
A filer like 'MAK:Company = 10' is ok
a filter like 'MAK:Period = 40023' id ok.
A filter 'MAK:Company = 10 AND MAK:Period = 40023' hangs the app and the worse thing is: it starts writing a temp file that eventually FILLS THE SERVERS HARD DRIVE!

Any ideas?

The table has a key
MAK:PERIODKEY         KEY(+MAK:COMPANY,+MAK:PERIOD),DUP,OPT

COMPANY and PERIOD are Long

No relations

so I can use the range limit (This works ok) but I really do not like the disk filling effect, especially since
Bruce has convinced me that ranges are always filters.

Tried with Clarion 7 and Clarion 8, I run the table thru TPSFIX (nothing to fix)

Anything that could lighten anything on this is greatly appreciated.

:: rainer

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Killer filter
« Reply #1 on: October 27, 2013, 02:55:43 PM »
There is a template option to send the filter to debug view.

You could try

'MAK:Company = ' & 10 & ' AND MAK:Period = ' & 40023 if coy and period are numeric fields otherwise wrap them in <39>

rainerwallenius

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
    • Email
Re: Killer filter SOLVED
« Reply #2 on: October 28, 2013, 01:25:33 AM »
Hi Kevin

Thanks for your input.
Yes, I am aware of sending filters to trace. Important to me - losing too often track of the '.

You were absolutely correct: MAK:PERIOD is actually a STRING, not a long. Clarion has tought me through the years that it is not really important what type of variables you compare, Clarion has sort of been very forgiving there converting stuff on the fly.

The solution is to use filter:

'MAK:Company = ' & p_web.gsv('Company') & ' AND MAK:Period = <039>' & p_web.gsv('period') & '<039>'

(actually I converted MAK:PERIOD to "long" in the dictionary so I don't have to be scared of filling the dard drive on the server ever again)