Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Disappearing alias?
Message
De
20/01/2005 09:35:41
 
 
À
19/01/2005 12:54:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Divers
Thread ID:
00977939
Message ID:
00978851
Vues:
30
Tracy --

The code snippet I sent to this forum is the exact code where I got the error, with nothing intervening.

It was just an accident, of course, that I referenced the alias immediately after creating it. I have had this before, with another cursor, where there was much intervening code (but nothing to do with reports)

By the way, I have never even heard of _vfp_autofield

Cheers


>I noticed that you have a quite a few ideas posted in this thread. I was just curious when you notice that the alias() is empty or the cursor is not available. Is it immediately following the select statement or later on in code? I ask simply because I noticed this happening too if _vfp.autoyield is set to .f. for some reason (possible set for an activex control but not reset to .t.) and the following code is run:
>
>*In this example, periodically vfp closes the cursor before the report finishes
>_vfp.autoyield = .F.
>SELECT * from mytable INTO cursor mycursor
>REPORT FORM myreport NO
>USE IN mycursor
>
>but both below code snippets work correctly:
>
>_vfp.autoyield = .F.
>SELECT * from mytable INTO cursor mycursor
>REPORT FORM myreport NOCONSOLE TO PRINTER
>DOEVENTS
>USE IN mycursor
>
>* or
>
>_vfp.autoyield = .T.
>SELECT * from mytable INTO cursor mycursor
>REPORT FORM myreport NOCONSOLE TO PRINTER
>USE IN mycursor
>
>
>Just wanted to add it to the mix.
>
>
>>Any guesses on how an alias can disappear?
>>
>>I have the following:
>>
>>      SELECT * FROM components INTO CURSOR MyComponents ;
>>         WHERE KitID==lcPartNo
>>      llIskit = 0<RECCOUNT("MyComponents")
>>
>>This is in a loop that is executed a few thousand times. On rare occasions, the second line fails with "alias not found" ... and when this occurs, ALIAS() is empty! That's right, I get a cursor with NO alias.
>>
>>Any guesses on how to get around this? (No, it's not as easy as doing RECCOUNT() -later on, having done various and sundry other things with other SELECT statements, I need to get back to this alias --)
>>
>>Thanks
Jim Nelson
Newbury Park, CA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform