Information générale
Catégorie:
COM/DCOM et OLE Automation
May be data session issue...
Depending on the condition...
If you create a global object up front of the application in the default data session, THEN, call a form that has a private data session, the tables opened in respective areas can't see each other.
The object defaults to its own data session when you make function calls to it. You may want to do a "SET STEP" to confirm and look at the SET( "DATASESSION" ) in the debug window to confirm.
I ran into this WAYYYYY back on another project and there were two possible resolutions...
1. Call the function with an initial parameter of the session, then any extra parameters ie: loGlobalObj.MyFunc( SET( "DATASESSION" ), OtherVars )
OR..
2. Create an instance of the object PER FORM INSTANCE... This way the data manager object would always be within the confines of the current private data session, its open tables, record pointers, etc...
For our scenario, we opted for #2.
HTH.
Précédent
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