Mike Yearwood
Toronto, Ontario, Canada
Information générale
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Hi James
>You might consider putting that data into cursors and having the forms use the default data session. You might also consider having that object instantiated within the data session of the first form and have other forms called by buttons on the first form. Such called forms can adopt the data session of the first form.
>
>Have tried for some time to avoid having forms share data sessions. Most of my forms create cursors which are then used in grids (yes, heaven forbid, my apps are based on grids, but they're the example of when using grids are appropriate). Sharing a single data sessions then causes major headaches with replication of cursor names.
I think many people are blindly avoiding sharing data sessions. There are potential problems, but then what is free of potential problems? It's my contention that everything has it's place, even grids and SQL.
What I do is assume that any cursor name is unique throughout a chain of forms. The first form in the chain has a private data session. All forms called from that first form participate in that data session. IOW instead of only having multiple instance forms, I have multiple instances of chains of forms.
So when forma calls forma1, forma1 does not open already open cursors. Performance is very good.
>
>Thanks for the suggestion in any case,
>
>Jim
>
>
>>Hi James
>>
>>>I understand that I can't pass a cursor between datasessions. I have read suggestions to use CursortoXML and back again, but I find that XMLtoCursor can be very slow for an interactive session (25 seconds is way too long for 2900 records). I'm looking for alternatives.
>>>
>>>Background: I have a class, created at the start of a user's session, which downloads a pile of data and creates summary information from it. All of my forms, with their own private datasessions, talk to this class to get the data they need. For all uses except one, using CursortoXML and back work fine, since the number of records involved is quite small ...
>>>
>>>Thanks in advance,
>>You might consider putting that data into cursors and having the forms use the default data session. You might also consider having that object instantiated within the data session of the first form and have other forms called by buttons on the first form. Such called forms can adopt the data session of the first form.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement