I didn't say it's necessary. I said it's a good practice. Doing this way you don't have to worry if some cursor 'tmpMyfavouritename' was left open (or is really need to be kept open) in some place and you try to use it now.
>Ed,
>
>This is not nnecessary for cursors but it is for tables. Cursors are only local alias names and the name for the underlying table will be unique. This is one of the very great advantages of using cursors over tables is that you don't need to worry about unique names you can use meaningful names.
>
>
>
>>You may have a function that you may call every time you need in alias, e.g.:
>>
>>Function gettempalias
>>Local cTempalias
>>cTempalias='A'+Substr(Sys(2015),3,10)
>>If Used(cTempalias)
>> Use In &cTempalias.
>>Endif
>>Return cTempalias
>>Endfunc
>>
>>and in your program:
>>
>>cAlias=gettempalias()
>>Select ... From ... Into Cursor &cAlias.
>>...
>>Select (cAlias)
>>...
>>Use In &cAlias.
>>
>>
>>>Hi Sir,
>>>
>>>How do I create a temporary aliases for my cursor?
>>>
>>>Normally, I just do this...
>>>
>>>
>>>SELECT * FROM poentry ;
>>>INTO CURSOR crsPoEntry
>>>
>>>
>>>> No problem. Btw, it is also a good practice to generate temporary aliases for cursors > every time when you use them.
>>>
>>>Please help.
>>>
>>>Thanks,
>>>Sam
Edward Pikman
Independent Consultant