Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
The Unknown Datasession
Message
De
04/10/2007 07:01:35
 
 
À
03/10/2007 08:35:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01258161
Message ID:
01258453
Vues:
13
>Hi Terry.
>
>>When you have a form open, and the Data Sessions window, you can see the name of the form, and the session # in brackets.
>>
>>eg. serRoutesFrm(2)
>>
>>Now I don't know if this happens when, say, another form is called and then you return to the first, or regardless, but at some point the DS now shows:
>>
>>Unknown(2)
>
>An unknown datasession means an object that had a private datasession has gone out of scope but the tables in the datasession weren't closed so it continues to live.
>
>Doug

One place where this happens, I've discovered:

On my list page there is a "Goto" button, whereby the user can go directly to a particular key value, say one of the IDs displayed in the grid. To do this a "Go to dialogue" is invoked. This essentially parses and verifies the value entered by the user (correct data type, length etc), before passing it back to the calling form, which then does a SEEK on it. Now as the dialog isn't doing any I/O I never even considered it for a data session (it was left as default). For the first time now I observed, in the DS window, this dialog "usurp" the DS of the calling form (which was 2) then, after the dialog closes, the calling form's DS was now unknown. Simply making the dialog private DS gets round this one. Now I'll be looking out for the exact instance where it might happen again, under different circumsatnces.

UPDATE: Do you know what? I can't seem to get it to the unknown DS any more, since the above simple change. I've always been concentrating on other things in the past and never noticed when this phenomenon happened.

As for adding objects, well I only add the combo class to the grid once per session (I got errors if I addobjected it more than once anyway, as expected), no matter how many times I refresh the grid with a new cursor
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform