Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem datasession
Message
De
27/08/2002 13:08:52
 
 
À
26/08/2002 13:56:12
Mike Sue-Ping
Cambridge, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00693745
Message ID:
00694120
Vues:
20
Mike,

What is ptst1?

If the add method adds something to the _screen in a private datasession, the private can't be released.

You could try Christof Lange's suggestion, which is to use the _VFP.DoCmd method. This adds objects in the Default Datasession, and could avoid your problem.

So, instead of 'ptst1.ADD(opoint)', use:

_VFP.DoCmd( 'ptst1.ADD(opoint)' )

Mace


>I have a form that uses a default datasession. It sometimes happens that when the form is released, the datasession remains as "Unknown(x)" where x is some number. I've managed to narrow down the lines of code that lead to this situation but I have no idea of why or how to prevent the Unknown(x) datasession from happening.
>
>I've investigated other leads regarding datasessions (like here at UT and FoxWiki) and tried to follow their suggesions but nothing I've tried seems to work.
>
>For those who may be interested, I have an ActiveX control (Mapobjects) on a VFP6 form. In a custom method, I put some code, part of which is as follows:
>
>
>SELECT maplist
>SCAN
>   pointspcl = placelocator.LOCATE(TRANSFORM(maplist.gis_routen))
>
>   IF pointspcl.COUNT > 0
>      * The following for loop causes the datasession to become Unknown and I don't know why.
>      FOR EACH opoint IN pointspcl
>         ptst1.ADD(opoint)
>      ENDFOR
>   ENDIF
>ENDSCAN
>
>
>If I comment out the three lines in the FOR loop, I don't get the problem. If I comment out the ptst1.Add(opoint) line I don't get the problem.
>
>Is there anyway in VFP6 to destroy an Unknown datasession?
>
>TIA
>
>Mike.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform