Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Switching DS in the form
Message
 
 
To
08/10/2008 18:03:11
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01353495
Message ID:
01353722
Views:
26
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--
Previous
Reply
Map
View

Click here to load this message in the networking platform