Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using NOFILTER
Message
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
Miscellaneous
Thread ID:
00502009
Message ID:
00502062
Views:
18
Sergey,

You're right, but he was selecting just one field from several. I was under impression, that in this case the file would be created anyway.

>Michel,
>
>W/o NOFILTER foxpro wasn't creating cursor on the disk. Instead it opened source table again with alias temp an issued a series command to get requred result.
>
>USE Point Again ALIAS Temp
>SET FILTER TO
>CREATION>=ldDate AND CREATION <=ldDate2
>SET ORDER TO CREATION DESCENDING
>
>?DBF("temp") would show the name of source table.
>
>Using NOFILTER forces foxpro to create cursor on the disk.
>
>>Here's one which took me 2 hours to find the reason. I had a SQL which was doing something like this:
>>
>>
>>SELECT CREATION FROM POINT;
>> WHERE CREATION>=ldDate AND CREATION <=ldDate2 ORDER BY 1 DESCENDING INTO CURSOR TEMP
>>
>>
>>Then, when I found there was a problem, I started to display some status. So, I had something like this:
>>
>>
>>SELECT CREATION FROM POINT;
>> WHERE CREATION>=ldDate AND CREATION <=ldDate2 ORDER BY 1 DESCENDING INTO CURSOR TEMP
>>MyFunction()
>>
>>FUNCTION MyFunction
>>Statut(ALIAS()+' '+IIF(EOF(),'EOF','NOT EOF()'))
>>SKIP
>>Statut(ALIAS()+' '+IIF(EOF(),'EOF','NOT EOF()'))
>>SKIP
>>
>>
>>At that time, since there was a problem, the first display was showing NOT EOF and the second one, EOF. However, the _TALLY was showing 20 records. So, I knew I was not suppose to be at EOF().
>>
>>So, I decide to add some status lines before the call to the function.
>>
>>
>>SELECT CREATION FROM POINT;
>> WHERE CREATION>=ldDate AND CREATION <=ldDate2 ORDER BY 1 DESCENDING INTO CURSOR TEMP
>>Statut(ALIAS()+' '+IIF(EOF(),'EOF','NOT EOF()'))
>>SKIP
>>Statut(ALIAS()+' '+IIF(EOF(),'EOF','NOT EOF()'))
>>SKIP
>>GO TOP
>>MyFunction()
>>
>>FUNCTION MyFunction
>>Statut(ALIAS()+' '+IIF(EOF(),'EOF','NOT EOF()'))
>>SKIP
>>Statut(ALIAS()+' '+IIF(EOF(),'EOF','NOT EOF()'))
>>SKIP
>>
>>
>>So, the result was now giving, NOT EOF, NOT EOF, NOT EOF and EOF.
>>
>>So, the only think I could see what that I was inside a function. So, I decided to move the status lines all in the same place:
>>
>>
>>SELECT CREATION FROM POINT;
>> WHERE CREATION>=ldDate AND CREATION <=ldDate2 ORDER BY 1 DESCENDING INTO CURSOR TEMP
>>Statut(ALIAS()+' '+IIF(EOF(),'EOF','NOT EOF()'))
>>SKIP
>>Statut(ALIAS()+' '+IIF(EOF(),'EOF','NOT EOF()'))
>>SKIP
>>GO TOP
>>Statut(ALIAS()+' '+IIF(EOF(),'EOF','NOT EOF()'))
>>SKIP
>>Statut(ALIAS()+' '+IIF(EOF(),'EOF','NOT EOF()'))
>>SKIP
>>
>>
>>That then gave me NOT EOF, NOT EOF, NOT EOF and NOT EOF. Which is what is good.
>>
>>So, I came up with:
>>
>>
>>SELECT CREATION FROM POINT;
>> WHERE CREATION>=ldDate AND CREATION <=ldDate2 ORDER BY 1 DESCENDING NOFILTER INTO CURSOR TEMP
>>
>>
>>By adding a NOFILTER, all is ok when I proceed in another function.
>>
>>Why is it like that?
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform