Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
And DataSession's again...
Message
From
26/03/2003 14:21:05
Charlie Schreiner
Myers and Stauffer Consulting
Topeka, Kansas, United States
 
 
To
26/03/2003 12:26:43
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00770299
Message ID:
00770395
Views:
11
Hi Gunnar,

>and this is the point where my 'toaster' explodes! up until the point of calling _screen.DbfOpen('access') the datasession is 2 (a private one created from the 'child' form). however, the first line in DbfOpen() (right after the LPara statement) the DS has magically switched back to 1 - the default one.<

_SCREEN.DBFOpen is an object that is contained in the screen. Objects automatically use the DataSession they were created in so..., any methods called in DBFOpen will be in DS1. I never use SET DATASESSION except for debugging. If you need access to a cursor, you must create the objects you need in the datasession you will use them in.
The VFP way of switching datasessions is a very good thing. It's what enables you to say:
Form1.Save()
Form2.Revert()
and have both forms operate in their own DSs without any SET DATASESSION stuff from you.
Charlie
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform