Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Curious Spurious Filter in Cursor
Message
From
30/04/2004 07:34:33
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Curious Spurious Filter in Cursor
Miscellaneous
Thread ID:
00899666
Message ID:
00899666
Views:
92
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.
Next
Reply
Map
View

Click here to load this message in the networking platform