Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Debug - Expression cannot be evaluated
Message
De
21/06/2012 12:19:40
 
 
À
21/06/2012 00:09:10
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01546485
Message ID:
01546534
Vues:
43
>>I would like to set a breakpoint in the debugger Watch Window everytime the record count in a table changes. However, the program frequently changes DataSessions. When this happens, the value of the expression turns to "Expression cannot be evaluated" and the debugger becomes active.
>>
>>Is there some expression I can use so that the debugger doesn't become active when the datasession switches, but only when RECCOUNT('mytable') changes?
>
>Sounds like when your code switches to another datasession, you want an expression that doesn't change, so the breakpoint isn't fired.
>
>One kludgy way to do this would be to "remember" the datasession number and RECCOUNT() of your table at the start of the debug session. To do that you would need to set a couple of public memvars ( or properties of a public object ) e.g.
>
>* Insert code before your debug section:
>gnSession = SET( "DATASESSION" )
>gnRecCount = RECCOUNT( "MyTable ")
>
>SET STEP ON
>...
>
>* Then, for your breakpoint expression you could use something like
>IIF( SET( "DATASESSION" ) = gnSession, RECCOUNT( "MyTable" ), gnRecCount )
>
If there was a way to reference a table in another datasession this wouldn't be necessary, but the help for SET DATASESSION says "tables in non-current datasessions are not accessible".


Thanks. I had a feeling it would be something like that but hope springs eternal, etc. etc. etc.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform