Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dangling Datasession after Report
Message
From
05/03/2008 03:05:06
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Dangling Datasession after Report
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01298809
Message ID:
01298809
Views:
54
Hi All,

this is a solution, I need no help on it.
A related problem might be.
http://cathypountney.blogspot.com/2007/12/gotcha-dangling-datasession-left-after.html

Problem:
I've created Hooks that I used via XML Memberdata on a listener based report.
After one report run I was unable to edit my report. (File is used)
After the report an Datasession UNKOWN was left. Within those report the frx file and several helpfiles where open.

Analysis:
I've played around with my hook to figure out where it fails, but without success. Finaly I put a Return False in its init, but the problem remains.
If the XML was empty, all was fine.
I debugged through the listener (I have changed the one shipped with VFP due to its problems, it craches with my language settings).
I figure out that if there was data in a XML Memberdata a extra Object of class fxmemberdatascript::listener.vcx would be instantiated.
This class is playing around with datasessions. A closer look shows that it does not reset the datasession.

Solution
I've searched all occurenses of SET DATASESSION in the methods of the class and wrapped the code with
LOCAL;
 liSession

liSession = SET("Datasession")

SET DATA...
....
SET DATASESSION TO (m.liSession)
If the last command in the orignal method was a reset to some DATASESSION, I've put a comment on it.
Like this snippet from ProcessDynamicMethodScript
...
      FINALLY
*!*	         IF m.toListener.FRXDataSession > 0
*!*	            SET DATASESSION TO (m.toListener.FRXDataSession)
*!*	         ENDIF
      ENDTRY
   ENDIF
ENDIF

SET DATASESSION TO (m.liSession)
Now you need to recompile the app, place it where it belongs (check _REPORTOUTPUT) and need to figure out how to ship that particular application with you main application. What a waste of lifetime.


Agnes
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Next
Reply
Map
View

Click here to load this message in the networking platform