| EvertDeJongh@gmail.com 2006-03-09, 3:55 am |
| Hi,
Anybody have any idea why the first piece of code would work but the
second not?
If i loop thru the file and do the IF it gets the correct record.
If i do a straight GET (PrimaryKey consists of the 5 fields
only,Unique) i do NOT get the record.
----Works-------------------------------------
set(FreightTariffs,TAR:PrimaryKey)
loop
next(freighttariffs)
if error() then break.
if TAR:JDECode = TT:ShipTo and
|
TAR:Carrier = TT:Carrier and
|
TAR:Province = sub(TT:FreightCalcZone,2,2) and |
TAR:TransportType = TT:FreightCalcMethod and |
TAR:Site = TT:Branch
{ I get the correct result here}
----------------------------------------------------
----Does NOT Work------------------------
clear(tar:record)
TAR:JDECode = clip(TT:ShipTo)
TAR:Carrier = clip(TT:Carrier)
TAR:Province =
clip(sub(TT:FreightCalcZone,2,2))
TAR:TransportType = clip(TT:FreightCalcMethod)
TAR:Site = clip(TT:Branch)
access:FreightTariffs.TryFetch(TAR:PrimaryKey)
{ Do NOT get the correct record}
----------------------------------------------------
Thanx
Evert
|