Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Curious Spurious Filter in Cursor
Message
De
30/04/2004 07:34:33
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Curious Spurious Filter in Cursor
Divers
Thread ID:
00899666
Message ID:
00899666
Vues:
90
Hello Gurus

I'm selecting census data about human populations in various zones. I have the concept of zone groups, the zones in a County, those in a district, all zones, etc. I use SQL successfully to fetch the correct data.

However, on the simplest of all, feching the data for an individual zone, as soon as I access my cursor, I get the error message:

Variable "NZONE" is not found.

Now, when I select a zone from a combo, I set the form's numeric prop .nZone to its key. Then I select the data via:
      Select * from mclMPFAC!CENSUSZN ;
        Where CENSUSZN.VAR_ID 	= 0 ;
        and	  CENSUSZN.ZONE 	= .nZone ;
      	Into Cursor csrCensusZn
CENSUSZN is a collection of population fields, each rec with a Zone # and a variant # (VAR_ID) - Simple!

I use the same cursor name for all the more complicated selects and no problem. But after creating the cursor in this case, I halted the prog and saw, in debug, that a filter had been created, thus:

ZONE.AND.=NZONE

No wonder I get the above err mess. But why!?

None existed before and the filter doesn't occur in ANY of the other cases. I've put in a "Set Filt to" command to enable me to get at the data but the cursor features ALL zones, not just the one row for the selected zone.

Can anyone help, please?

TIA

Terry
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform