Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Debug - Expression cannot be evaluated
Message
From
21/06/2012 12:19:40
 
 
To
21/06/2012 00:09:10
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01546485
Message ID:
01546534
Views:
42
>>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform