Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
State of a cursor in error log
Message
From
23/04/2022 16:51:49
Al Doman (Online)
M3 Enterprises Inc.
North Vancouver, British Columbia, Canada
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01684235
Message ID:
01684236
Views:
36
>I am pretty much sure that what I am asking is not possible. But I will ask anyway, just in case.
>
>When I scan (with FOR) though the Stack array (ASTACKINFO), can I get the state of an alias at each point? That is, say, I want to see if an alias cAlias was open or close at each FOR?
>
>ASTACKINFO(aProgStack)
>FOR iEle = 1 TO ALEN( aProgStack, 1 )
>        ?? select(cAlias) > 0
>NEXT
>
What you're asking for is history. Unless explicitly saved, it isn't available; subsequent calls could close or open a given alias ad infinitum.

You could manually log the state of the alias immediately before each subsequent call, or you could wrap your calls in a function which does that logging.

One way would be to declare a local variable and set its value immediately prior to your next call:
LOCAL llIsAliasOpen
llIsAliasOpen = SELECT( cAlias ) > 0

MyNextMethodFunctionOrProcedureCall()
Then, in your error handler you can LIST MEMORY. It will show a bunch of llIsAliasOpen memvars, one at each call level, with its value at that level.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform