General information
Category:
Coding, syntax & commands
I have found that if you execute _tally immediatley after the query it is correct.
SELECT * FROM table INTO Cursor
IF _TALLY > 0 .. etc
If you have any commands in between the query and your _tally command sometimes the _tally value has been changed by something inside VFP. ( don't ask me what I just know it happens )
SELECT * FROM table INTO Cursor
* some code in here
IF _TALLY > 0 .. etc
For a way to always have a tally accurate, immediately after a query I assign _tally to a variable before doing anything else. This way I can do other things necessary before I check _tally and go from there based on it value.
SELECT * FROM table INTO Cursor
lnTally = _TALLY
It is the same reason I always have a SELECT TableAlias as the last line of a set of instructions inside a SCAN ... ENDSCAN, because on occasion VFP forgets what table it is scanning when it hits the ENDSCAN.
MLW
Previous
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