For Programmers: Free Programming Magazines  


Home > Archive > Clarion > March 2006 > Set/Next works but GET not









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Set/Next works but GET not
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

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com