Hi Friends,
I found the problem that was causing DataSession Unknown(2)
A Bug in VFP8 SP1. I tested in VFP9 Beta and worked Ok
Thanks all that helped me.
For confirmation execute the code below
*- TestBUG.PRG -*
*-
*- execute the code below, leave the form, execute the command SET in the
*- command window and see that a DataSession was Unknown(2)
frmTest = CREATEOBJECT("MyForm")
frmTest.Show()
RELEASE frmTest
* ----------- Classes Definitions ------------------*
DEFINE CLASS MyForm AS FORM
DataSession = 2 && Private DataSession
WindowType = 1
PROCEDURE INIT
This.AddObject('ContainerTest','MyContainer')
ENDPROC
PROCEDURE RELEASE
This.RemoveObject("ContainerTest")
ENDPROC
ENDDEFINE
DEFINE CLASS MyContainer AS Container
PROCEDURE INIT
*- The bug is in the line below
*- If the line below is executed the DataSession stay
*- Unknown(2) after the form release
IF This.Parent.Objects.Count = 1 && Here is the problem
ENDIF
ENDPROC
ENDDEFINE
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only