>Hello everybody,
>
>I am using VFP6 and found the USED function a bit confusing. Sometimes when a file is open, it does not detect the fact that it used. It does not work not only when the file has different alias, but also when the file has exactly the same name as the USED('myfile') states.
>
>Is there any change in VFP regarding that, or another function which will work better? In FPW26 I had no such a problem.
>
>NB
>In this particular case I did not use the data environment intentionally because the file location depends.
>
>Thanks in advance,
>
>Jonathan
Jonathan,
Used() works for aliases only and it only detects current datasession. It might be in use in another private datasession with that alias same as filename. Within the same session I never encountered it returning wrong info, do you have reproducing code ?
Your strategy would mostly depend on what you're trying to do.
You can use DE even if the file location changes. Check for messages about it in last 1-2 months. Keyword might be 'updateDE'.
Cetin