>>>VFP always first looks for any file inside EXE/APP and only if it cannot be found, looks for it on the disk.
>>
>>Okay, it's good to know that this is the sequence rather than the other way around. Having concluded that, I must tell what I saw happening:
>>
>>The error message reported the table's name INCLUDING THE PATH. How could it know the path?! It must have been SPYING in the information about the OPEN tables, as available in memory. It would have been piece of cake for the programmer to conclude that it was okay to use the obviously somewhere included (and thus readonly) and already open table.
>
>Most likely VFP internally uses DBF("TableX") so it can open the table again.
>
>Oh well, we'll have to live with it. Problem is I cannot think of a simple workaround.
>
>It should work if you create a cursor with name TableX instead of the table.
>
>
>USE TableX IN 0 ALIAS Whatever
>SELECT * FROM Whatever INTO CURSOR TableX NOFILTER
>USE IN Whatever
>
The
SELECT * FROM Whatever
goes wrong. SQLE knows that Whatever is actually TableX. OTOH, if these statements are done in the EXE that INCLUDES the table, then it should indeed work.
Update: I have tried this, but the second line gives an error: Alias name is already in use.
Groet,
Peter de Valença
Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.