Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form with private datasession calls a .prg. What happens
Message
 
To
06/05/1998 09:37:27
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00097056
Message ID:
00097352
Views:
26
>>>>>When i call a .prg from a form which has a private datasession, the program opens another datasession for all the cursors or tables.
>>>>>To solve this, i pass the datasession as a parameter and issue a 'set datasession to (parname). Is there another better solution to do this ???
>>>>
>>>>What we are doing is that we create a custom method in the form and put the program in it. The trouble with this approach is redundancy of coding especially if the program seems reusable, but it is safer and much easier to maintain.
>>>
>>>Jess: Well, i do always, but if the code must be used by a lot of process in different forms. In this case perhaps the solution is to place code in n object public for all, but then the problem is the same: differents datasessions.
>>>
>>>Thanks.
>>
>>What about passing the forms SessionId to the prg and use SET DATASESSION TO (mSessionId) in your program.
>
>As i said in my message, that's what i do now. Thanks otherwyse.


Sorry about that. In quickly skimming the thread I missed that. I haven't had a need for this functionality yet myself but know I will at some point and my first instinct would be to do as you have done.
Colin Magee
Team Leader, Systems Development
Metroland Media Group Ltd.
Mississauga, Ontario, Canada

cmagee@metroland.com

Never mistake having a career with having a life.
Previous
Reply
Map
View

Click here to load this message in the networking platform