Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Weird SEEK
Message
De
15/11/1999 05:57:09
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00290345
Message ID:
00291170
Vues:
30
>>Actually, I have two unrelated questions:
>>
>>1. How do I turn on line numbering when I am editing code? I can't find it anywhere, and I am tired of counting lines . . . .
>>
>>2. I have a method in a class that calls another method in the same class to check for enrollment conflicts for a school registration routine. The called method has two simple lines of code that are giving me trouble:
>>
>>cKey = THIS.cStuFKey + THIS.cTerm
>>SEEK cKey IN NewEnroll
>>
>>I now want to check each student for enrollment conflicts. So the first method calls the 2nd one 370 times--once for each student. The very first time this code is called, I get an error #12 (variable cTerm does not exist) on the SEEK statement(!). If I ignore, it then works perfectly for the remaining 370 students. If I examine cKey just before SEEKing, it is properly formed the very first time. That is, it consists of a student's foreign key + the proper term.
>>
>>Any ideas where to look would be deeply appreciated.
>>
>>TIA,
>>John
>
>
>1st quesiton - when you modi comm under the edit menu look under properties.
>
>2nd quesiton - I wonder if a select might work better here.

Hi, Dan.

Thanks for kicking in here. 1st question--no problem. Thanks for the guidance. 2nd question: I'm not sure what you mean by "a select". Are you talking about a SQL statement? I could, indeed, use one here now that I think about it. I am using a DO WHILE loop to examine every record for the target student for the target term. As a matter of fact, I'll try that as a work-around. Still curious, however, as to how such an oft-used process could produce such an error message.

I'll let you know how SQL works here. And thanks, again, for the suggestion.

John
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform