Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP Bug: cannot find table causing error in dataenviron
Message
De
22/01/2001 16:08:24
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
21/01/2001 16:41:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00466367
Message ID:
00466966
Vues:
12
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform