Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with Private data Session
Message
De
29/05/2002 21:34:39
Charlie Schreiner
Myers and Stauffer Consulting
Topeka, Kansas, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00662505
Message ID:
00662829
Vues:
14
Hi Gerard,
This all makes sense to me. I would guess if your mouse cursor is over the form and you press F10, it would probably work. The form with the private session should be and is in charge of the data. You can't just use it willy-nilly outside the form. MyPrg1 works when called inside the form. But the OKL calls it from somewhere else--perhaps.
Rather than messing with DataSessionIDs, just call a method in the form.
Example:
WrapperForF10.PRG
IF TYPE("_SCREEN.ActiveForm")=="O" AND PEMSTATUS(_SCREEN.ActiveForm, "YourMethod", 5)
_SCREEN.ActiveForm.YourMethod()
ENDIF

Now the work is being done in the session.

>Hi,
>
>I have a Private Data session form , with one File in DE (called KMA)
>Also have a simple MyPrg1.prg with two lines:
>Sele KMA
>Brow
>
>I have two buttons, each which call MPPrg in different way
>MyButt1: Do MyPrg1
>MyButt2: On Key Label F10 do MyPrg1
>
>If I click button 1, Mprg1 runs ok
>If I click Button 2,and F10, I get an error saying Alias Kma not found
>
>Now if I change the screen to a Deafult Data session, all is ok !!
>
>Is there some inherent problem using Private datasessions and an On Key Label ??
>
>If so, is there a workaround. In my calling prg, I want to set a few on key label commands so tht they stay in place for the duration of the app.
>
>Any help appreciated.
>regards,
>
>Gerard
Charlie
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform