Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Where should I declare a view parameter
Message
From
06/07/1999 12:23:53
Steven Herbin
SNH Computing Corporation
Swan Lake, New York, United States
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00235912
Message ID:
00237814
Views:
19
>>I would like to include a paramaterised view within the forms DE and would like to know what the recommended way of doing this is. I can obviously declare a public variable in the DE in the before load tables method but this seems a bit clumsy. Is there a better alternative? I have looked in the FAQs and the MS support area but have had no joy.
>
>Mike,
>
>In the DE make the view's NODATAONLOAD property .T.. Then in the form's Init you can set the parameter and Requery("TheView") to get the data.

Jim-

I have a little twist on the above:

I have a form that can be used for editing/adding/etc. 2 different tables based
on a parameter passed when the form is called (in the do form ...). What I expected to use was a view with a macro expansion for the table name. The problem is, I can't figure out where to put the code for the view since I have bound controls.

Example:
create view payroll as ;
select * from &company.pyrll ...

&company would resolve to the prefix for the company's payroll file.

Normally we would pass the parameter to the INIT of the form, but from what I've read (including your Essentials book -- a fine text), the timing seems to be wrong for getting into the DE correct, or am I reading it all wrong.

I'm going to bang together a little test form to try it out, but any help in the meantime would be appreciated.

--
Steven Herbin
SNH Computing Corporation
Swan Lake, NY
Previous
Reply
Map
View

Click here to load this message in the networking platform