My example was merely that -- an example. As I had need for the alias later on in my program, this example merely demonstrated that the alias disappeared.
In any case, I think it odd that _tally would be considered "the right way". There doesn't seem to be any explicit reason in the language itself for this preference, so I'll assume there is some implementation dependency I am unaware of.
Chhers
>I think this is better than a long shot.
>
>A "filtered result set" is a likely outcome of the original statement and these can bring "oddities" in later processing.
>My *guess* on this one is that it acts more like a "INTO ARRAY..." when no records are selected, in this case not creating the "cursor".
>
>I'd also bet - assuming no other processing on the "cursor" - that checking _TALLY would have worked properly.
>Checking _TALLY is, in my opinion, the right way to check what was produced by a SELECT statement.
>
>cheers
>
>>I'm all for long shots when there's no other alternative ... jim
>>
>>>A long shot? Would including the NOFILTER to the query make any difference?
>>>
>>>>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