General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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..
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only