>I have number of forms having many free tables in their dataenviroments.
>
>If error occurs on form dataenvironment opening, VFP 5 displays general error message, for example
>
>Error loading file - record number 27. DOCLIST
.Loading form or the data environment : File access is denied
>This message is written to users logfiles.
>
>How I can determine which table causes this error ?
>
>Record 27 is a form dataenvironment record, not a cursor record.
>I tried aerror(), dataenvironment error event, message(), sys(2018)
>but none of them will not give an error.
>
>At runtime, I want to know exactly which table causes this error in users computer. So it seems that it is not possible to use VFP dataenvironments at all.
>Removing all dataenvironments from all of my forms and creating them manually is a lot of work.
There's the error event of the DataEnvironment - where you could parse the cursor objects and check which is the first one which refused to open. But then, this is sort of equal to manually creating your DEs, because you'd have to insert this code into the DE of every form you already have, or create your own DE class and then instantiate it for each of your forms. Writing a builder to do this shouldn't be too hard, but then you could just write another one which would insert the error checking code into all of your .scx files DE methods.
Either way, lots of work to do, and I really wish Fox default error handler would just tell us which table didn't open.