Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP Bug: cannot find table causing error in dataenviron
Message
From
22/01/2001 16:08:24
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
21/01/2001 16:41:59
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00466367
Message ID:
00466966
Views:
11
>I addded the following code to dataenvironment.Error method.
>Why this code fails: all cursor objects exists but used() returns .f. always!
>How to dedect the table causing an error ?
>
>
*  dataenvironment.Error method.
>LPARAMETERS nError, cMethod, nLine
>
>LOCAL i, aCursors[1], cLastAlias
>AMEMBERS(aCursors, thisForm.DataEnvironment, 2)
>
>nUsed = 0
>
>FOR i = 1 to ALEN(aCursors)
>  WITH EVAL("thisForm.DataEnvironment." + aCursors[i])
>    IF lowe(.BaseClass) != "cursor"
>      loop
>      endif
>  if used(.Alias)
>    nUsed = m.nUsed + 1
>    endif
>    ENDWITH
> endfor
>* nUsed==0 here always.
>
Looks like worst-case scenario, or is it the very first table which gives you the error? One thing I wanted to try with this is to hide the 7th table and see if Cursor7 would be the one giving the error. Do this on something that otherwise works, so I'd know it's regularly detecting the introduced error.

Another thing to try - check if any of these tables can be USEd while still in the error method, and see what error you get if you try.

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