Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What to log when alias is not open?
Message
 
 
To
09/11/2016 16:25:30
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01642948
Message ID:
01643019
Views:
28
>>Since the cursor that is not open is always associated with the certain BIZ object (Cursor Adapter object), I will probably check if the BIZ object is instantiated and some other properties of this BIZ object. Hopefully this will help to track the problem.
>>Any comments/input would be appreciated.
>
>My approach is to use my own cursor adapter class, where every after*() method (at least) in the adapter's events is overridden, and then if the lResult=.f., I issue an aError(ee) and then check what the error was. At least this is how I catch the SQL errors - never tried this with dbfs.
>
>And I'm not opening the alias and then attaching (it to) a CA; I'm instantiating a CA which will open it.

I think I do pretty much the same. Although since I have not changed the code for a while I have to look and see. I am sure there is more than one way to use Cursor Adapter and create a BIZ class. Since my base BIZ class has been working for some long time, I am not going to change it.

I just need to find in my code where and what closes the cursor. I am writing some "logging" code so instead of SELECT MY_ALIAS there will be call to a function (e.g. MY_ALIAS_SELECT("Method and Place in the Method") which will check if the alias is open. If not, the log code will store it with the information on where it happened. If this does not work, I will try a different approach.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform