Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using NOFILTER
Message
 
 
À
01/05/2001 12:06:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Divers
Thread ID:
00502009
Message ID:
00502025
Vues:
23
>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?

How many fields your Point table contains? And what does STATUT?
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform