Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
USE DBF() AGAIN not working outside Private form
Message
From
30/03/1999 23:43:35
 
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00199080
Message ID:
00203737
Views:
16
Ned,


That's really an interesting idea. I've never tried switching DS as the help warned against doing it other than for debuggin purposes.

I suppose releasing the form releases THIS.oOtherData as well as oOtherData is a property referencing the object.

I'll try this out to see if it fits in well with the entire environment, and will get back to you.

Thanks.

Kenneth.


>Recently, I fiddedl with the idea of transfering records like parameters into another form. Obviously, iusing the cursor came first to mind.
>
>Hello again,
> I have played with this idea as well. One observation I came across that might be useful, calling an object method switches to the datasession that was current when it was created. If all you need is access to cursors in a separate datasession you might try the following:
> lnDataSessionID = SET("DATASESSION")
> SET DATASESSION TO {DataSession of other form}
> *-- cstMyData has methods to access data from cursors
> This.oOtherData = CREATEOBJECT("cstMyData") && or AddObject to taste...
> SET DATASESSION TO &lnDataSessionID
>The new object oOtherData "lives" in the other form's datasession and can access all data inside it.
>
>HTH,
> Ned
Kenneth.
Previous
Reply
Map
View

Click here to load this message in the networking platform