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

It is not a first table. I used some of tables exclusively in
other vfp command window. In DE Error event, no one table is opened!

>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.

It seems simpler to set autoopentables .f. , loop
through DE cursors in Form Load event and open them manually.
I dont use any DE events. It this exactly the same as letting
form itself to open all tables ?
Andrus
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform