Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP Bug: cannot find table causing error in dataenviron
Message
From
21/01/2001 13:41:44
 
 
To
21/01/2001 13:23:44
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00466367
Message ID:
00466374
Views:
12
>>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.

I'm ready to add a call to generic method into all of my DE
Error methods.

In Error method, the cursor object does not exist since it cannot be
opened.
How can I determine then name of this cursor in Error event?
Must I open .scx file, find first unopened cursor and assume that
this is the cursor causing error? Or is there some simpler way?
Andrus
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform