Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What can Cause a Data Session to stay open.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00411286
Message ID:
00411332
Vues:
10
Hi Mark,

OK in the same method in form A I did the following:
RELEASE m.loEmployeeForm

The above was the last line in that method, and that
did not change much.
After testing still got the same error message.

As I said before if I use the CREATEOBJECT() instead
of MEWOBJECT() then the problem is gone.

Thanks

Doron

>I understand that, but to prevent a dangling reference, you have to release >any references [or set them ot .null.] to other objects before you release the >objects referenced.
>
>From what you have given, I can not tell if you release the reference [variable] before or after you release the actual form referenced by the variable.
>
>>Hi Mark,
>>
>>loEmployeeForm is a local memvar in form B. I have a general array
>>which keeps track of all opened forms.
>>
>>So I did the following: (in form B)
>>
>>LOCAL m.lnPos,m.loEmployeeForm,
>>m.lnPos=ASCAN(oApp.aActiveForms,"frmEmployee")
>>m.loEmployeeForm=oApp.aActiveForms[m.lnPos-13]
>>
>>m.loEmployeeForm - is the reference object of form A.
>>
>>Thanks
>>
>>Doron
>>
>>>Do you release or set to .NULL. the loEmployeeForm reference before you >release Form B?
>>>
>>>>Hi All,
>>>>
>>>>From form A I post some records into form B.
>>>>The table in form B is within a child grid.
>>>>
>>>>so I have to turn off the relation post the records
>>>>and then turn the relation on, something like that.
>>>>
>>>>While m.loEmployeeForm is the reference object of form B.
>>>>This code is within form A.
>>>>
>>>>WITH m.loEmployeeForm.pgfChild.Page1.grdChild
>>>> *** Select the Perant
>>>> SELECT (.LinkMaster)
>>>> m.lcRelExpr="cEmp_SSN"
>>>>
>>>> *** Turn off the relations
>>>> SET RELATION OFF INTO (.RecordSource)
>>>>
>>>> .... More Code
>>>>ENDWITH
>>>>
>>>>Latter on I close both forms and open another one and there I have
>>>>a problem I can not delete a table, even though USED() is FALSE.
>>>>
>>>>I am getting an error that the table is busy.
>>>>
>>>>In my Init method of that form I have the following code:
>>>>
>>>>IF VARTYPE(oCustomApp)=="U"
>>>> PUBLIC oCustomApp
>>>> oCustomApp=NEWOBJECT("CustomApp","LasApp")
>>>>ENDIF
>>>>
>>>>If I change the above code into the followng the
>>>>problem is gone:
>>>>
>>>>IF VARTYPE(oCustomApp)=="U"
>>>> PUBLIC oCustomApp
>>>> SET CLASSLIB TO LasApp
>>>> oCustomApp=CREATEOBJECT("CustomApp")
>>>>ENDIF
>>>>
>>>>Now anybody has an idea about it. There are no transcations
>>>>either, in form A or form B.
>>>>
>>>>Thanks
>>>>
>>>>Doron
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform