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 14:40:05
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
21/01/2001 13:41:44
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00466367
Message ID:
00466382
Views:
13
>>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?

The cursor and relation objects exist during the BeforeOpenTables - put any code there, and you will find them.

I don't have the code here, but manipulating cursors in BeforeOpenTables involved something like
n=amembers(aarray, this, 2)		&& member objects
for i=1 to n
   oObj=aarray[i]
   if oObj.BaseClass='Cursor'
       [ your code here, involving oObj.Alias etc]
   endif
endfor
I'm assuming you can use something like that in the Error method. You can actually run something like "Do DEErrorCheck with This" and have the code not repeated in each DE.

If you're still not seeing anything (i.e. you get n=0), I've probably run out of tricks... until tomorrow.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform