Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Disappearing alias?
Message
From
19/01/2005 12:54:44
 
 
To
17/01/2005 22:28:18
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Miscellaneous
Thread ID:
00977939
Message ID:
00978631
Views:
29
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
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform