Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multiple instances of same form
Message
 
 
To
25/10/2004 08:59:28
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00953971
Message ID:
00954237
Views:
14
Jim,

Well I always set it on the property sheet, but yeah that's all there is to it. Your DataEnvironment wouldn't have to change from what it is now. Each form will have it's own curUsers, they will not conflict with each other.

The only downside, if you are used to doing everything in the Default DS, is that forms can not share the same table/cursor environment. A cursor can not cross the DS boundary. You can convert the cursor to XML and pass the XML across the boundary and reconvert it to a cursor.

If you are working a lot in a parent/child forms situation, set the parent form as a Privae DS, and set the child form to be Default DS. When the parent form launches the child form, it'll be running inside the privae DS of the parent form.

>David, is this all I have to do is to set the THISFORM.DataSession = 2 to have a private data session? Do I have to set up a DataEnvironment or anything else? The way I understand what you are saying is that when my SQLEXEC() function returns a cursor which I named 'curUsers' that that cursor is private and no other processes know anything about it. The name I give it, 'curUsers' can then be used in another instance of this same form or in another form that does the same thing and call that cursor 'curUsers'. Both cursors named 'curUsers' can exist in the same instance of VFP and are only known by the program/process that created them? There is no name conflict? If this is the case it's way too easy!
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform