Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Which is faster: Seek() or eof() in this case
Message
From
27/04/2004 12:16:45
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Which is faster: Seek() or eof() in this case
Miscellaneous
Thread ID:
00898584
Message ID:
00898584
Views:
50
Hi all,

I can do some benchmarks on this but if there is a general idea as to which one is faster in this scenario:
* scene1:
select fktable
go top
scan while !eof()
  replace fktable.fkdata1 with iif(seek(fktable.fkid, 'pktable', 'pkid'), pktable.pkdata1, "")
  replace fktable.fkdata2 with iif(seek(fktable.fkid, 'pktable', 'pkid'), pktable.pkdata2, "")
endscan

* scene2
select fktable
go top
scan while !eof()
  seek(fktable.fkid, 'pktable', 'pkid')
  replace fktable.fkdata1 with iif(eof('pktable'), "", pktable.pkdata1)
  replace fktable.fkdata2 with iif(eof('pktable'), "", pktable.pkdata2)
endscan
ramil
~~ learning to stand still
Next
Reply
Map
View

Click here to load this message in the networking platform