Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Foxpro telling me porky pies again
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
00981259
Message ID:
00981299
Vues:
23
Thanks for the input, guys. I'm just formulating it in my head. Yes, there are indeed 3 tables with a ZONE field: ALLZONES, RZSTOP and the cursor I'm scanning, to wit:
lcSetZoneCsr = thisform.cSetZoneCsr
SELECT DISTINCT RZStop.number as Num, Allzones.ZONE, Allzones.desc as Zone_Desc, ;
	NVL( Stop.stop_no, SPACE(8)) as Stop, NVL( Stop.name, "") as Stop_Desc, ;
	RZStop.County as CountyCode, .F. as Flag, Time ;
 FROM  mclmpser!RZStop ;
    LEFT OUTER JOIN mclmpStop!Stop ;
	ON ALLTRIM( RZStop.stop)	== ALLTRIM( Stop.stop_no) ;
    LEFT OUTER JOIN mclMPFac!AllZones ;
	ON RZStop.ZONE		== Allzones.ZONE</b><pre> ;
    WHERE ALLTRIM( RZStop.rte_no)  	== ALLTRIM( tcRoute) ;
      and ALLTRIM( RZStop.rte_let)	== ALLTRIM( tcGen) ;
      and ALLTRIM( RZStop.directn)	== ALLTRIM( tcDirectn) ;
      And RZStop.SeqNo					== 1 ;
 INTO CURSOR ( lcSetZoneCsr) READWRITE;
 ORDER BY 1
and then
Select ( lcSetZoneCsr)
Locate
SCAN
  lcSeekKey = thisform.cRoute + thisform.cGen + thisform.cDirectn ;
	   + "1 " + STR( ZONE, 4)
  If SEEK( lcSeekKey, "RZSTOP", "RGDSZ") 
      lcFlag	= RIGHT( RZSTOP.FLAGS, 1)
  Endif 
  Replace FLAG with IIF( lcFlag = "E", .T., .F.)	&& in the cursor
ENDSCAN
I can see how ZONE may be misinterpreted - there IS a ZONE 132 in ALLZONES, but, as you can see, I AM IN and scanning lcSetZoneCsr, so I would have assumed FP would interpret this as a priority.

So I had decided to prefix the field but not sure how to do it. I've used a named expression to get the cursor so how can I use this in the expression:
lcSeekKey = thisform.cRoute + thisform.cGen + thisform.cDirectn ;
+ "1 " + STR( lcSetZoneCrs.ZONE, 4)
gives an error. How?


>What about the record pointer in the table with the ZONE field? Is there a record in that table with 132?
>
>Richard
>
>>Hi Sergey
>>
>>No
>>
>>>Terry,
>>>
>>>Do you have, by any chance
#DEFINE ZONE 132
in your code?
>>>
- 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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform