Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing Parameters and Arrays into/out of Data Environment
Message
From
18/12/2006 16:03:09
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Passing Parameters and Arrays into/out of Data Environment
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01178703
Message ID:
01178703
Views:
59
1) I want to call a form with parameters values that are used to open files and set filter conditions in the data environments 'OpenTables' Method. I am using a Private Data session modal form.

2) I also want to load data into arrays in the 'OpenTable' method and use the arrays to drive Combo boxes on the form. I am using a Private Data session modal form.

3) I call the form with:
do Form1.scx with Parm1, Parm2

4) The Form1.Init method contains the following:
Parameters Parm1, Parm2

5) This gets the parameters into the form fine. However, I am having a problem using them in the data environment. Is there code that can be placed in the Form1.init method that can pass values into the data environment?

6) Also in the data environment 'OpenTables' method I am placing data into arrays that I am using to drive Combo boxes on the form. I am then closing the .dbf's so that while the form is being used only one .dbf (the main one being accessed) is open. I open it last in the 'OpenTables' method after loading the other data and closing their tables. Is there a way to pass the array info back from the data environment to the form other than declaring it public?

My reasons for doing this are twofold: First is to make the forms self-contained in terms of memory variables. Pass in what outside info is needed and create the rest. The second is to use the OpenTables method to get all the data the form needs to process. This processing includes loading the arrays, closing their associated tables, passing them back to the form to drive combo boxes, and finally opening the main .dbf for the form.

If you have an answer that's great but if I've missed the boat here - somebody PLEASE set me straight!!!

Thanks in Advance
Next
Reply
Map
View

Click here to load this message in the networking platform