Information générale
Catégorie:
Gestionnaire d'écran & Écrans
>>I need to pass a cursor that resides in a form with data session set to private to another form. I know it kind of defeats the whole purpose of having a DS that's private and wanting to do this but I have the need nonetheless. I know I can't pass a whole cursor as a parameter (w/o using ADO?) but is there another way?
>
>Sure - pass the data session ID and alias as parameters, and do something like:
>
>LPARAMETERS nDataSessionID, cAlias
>* Note - no error checking. I'd add it.
>LOCAL nMyDataSessionAtStart
>nMyDataSessionAtStart = SET('DATASESSION')
>SET DATASESSION TO nDataSessionID
>LOCAL cDBFReference
>cDBFReference = DBF(cAlias)
>SET DATASESSION TO nMyDataSessionAtStart
>USE (cDBFReference) AGAIN SHARED IN 0 ALIAS WhatEver
Wouldn't this cause problems if we have some data bound controls ???
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