Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Switching DS in the form
Message
 
 
À
08/10/2008 18:03:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01353495
Message ID:
01353722
Vues:
25
This message has been marked as a message which has helped to the initial question of the thread.
Hi Lennert,

Yes that's what I meant (almost). You do not have to create object of the class based on session outside of the form, though. You can instantiate it at the point where you need it.

>
>In my case the focus was not on the grid (it was on a textbox) but the grid complained.
>But in the meantime I think I understand what Sergey wrote, and I think he is right.
>
>- Before the form opens, declare an new sessionobject
>- Define a userdefined method for the session
>- In that method of the session call your prg.
>- Now from within your form, call loSession.Yourmethod. Now you don't do an explicit "set datasession to", but because the code is from within the sessionobject, it will operate in that session. Implicit you switch sessions now, and thereby may avoid the problem.
>
>I think this is what Sergey meant. I didn't test it, by the way. If this is it, S. deserves the stars...
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform