Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange Situation.
Message
From
03/02/2000 07:00:18
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
03/02/2000 04:18:04
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00326579
Message ID:
00326612
Views:
19
>Hei!
>
>I was wondering if anyone could explina this situation.
>I collegue who has since left the company made a server tool which loops through a table
>and does some processing..
>
>He uses a field called admstatus a character field. With a tag on it.
>
>SO the code looks like
>
>SELECT pdmlog
>SET ORDER TO TAG AdmStatus
>GO TOP
>
>IF EOF()
> EXIT
>ENDIF
>
>
>IF NOT EMPTY(pdmlog.admstatus)
> EXIT
>ENDIF
>
>
>-do some stuff
>
>Sometimes but not often the program loops endlessly on the same record
>which is not empty in the admstatus and is not at the end of the file..
>
>What happens in this loop is he is expecting all the empty records to be first in the table.
>Why would doing the SET ORDER TO TAG not have the empty records first?
>
>I added a
>SEEK ""
>To move to the first empty record but I can't seem to figure out why this situation would occur.
>
>Thanks a Mil..


Tim,
SEEK "" would mean a fast "go top" if set exact is off. It might not be empty if index has a filter or descending. Also "set deleted" might effect what you get with that go top and relations as well. "do some stuff" part seems to be the mystery part (eg: changing workareas and refresh that forces a rec pointer movement in a relation) :)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform