rivern
18th January 2005, 07:50
:eek: Dear All :
when we develop inquiry session . we used query.extention , but it samed query.extention exists a max length , the following part is original query extention .

query.extension="fscpp255.itm4 between :proj4.f and :proj4.f and fscpp255.pjno between :proj8.f and :proj8.t and fscpp255.desc between :cuspn.f and :cuspn.f and fscpp255.stau between :stat.f and :stat.t and fscpp255.trtp between :trtp.f and :trtp.t and fscpp255.crdt between :crdate.f and :crdate.t and fscpp255.pcdt between :rdate.f and :ordate.t and fscpp255.plnt between :plant.f and :plant.t and fscpp255.orno between :so.f and :so.t and fscpp255.crfn between :crf.f and :crf.t and fscpp255.pd01 between :redate.f and :redate.t and fscpp255.crid between :user.f and :user.t "

would you other method for this . thanks for your help

vahdani
18th January 2005, 10:08
Hi,

think of the poor old database that has to process this query!! Better: Create a suitable index (say index5) oon your table and use it as follows:

query.extension=
"fscpp255._index5 inrange{:proj4.f, :proj8.f, ...}
and {:proj4.t, :proj8.t, ...}"


You can still use following for extra fields when your query.extension gets too long:

main.table.io:
after.read:
if not (fscpp255.crid >= user.f and
fscpp255.crid <=user.t ) then
skip.io("")
endif


BY THE WAY is this a typo?
query.extension="fscpp255.itm4 between :proj4.f and :proj4.f and ...

should it not be ":proj4.f and :proj4.t" ?

Hitesh Shah
20th January 2005, 16:22
Also check the length of query.extension . It may not exceed 512 chars.

rivern
16th January 2008, 08:44
Thanks very for advice.