Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Which name do I use when working with views?
Message
From
22/04/1998 13:01:18
Rex Mahel
Realm Software, Llc
Ohio, United States
 
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00094029
Message ID:
00094055
Views:
20
>I'm in the middle of my very first Codebook for MM app. It's basically a class that is mostly written that I am converting over to CB-MM. I've defined a data environment called StatsEnvironment that contains 7 or 8 views.
>
> v_Avg
> v_TotalAmt
> ... etc
>
> I've also created a new business object based on KBizObj and set it to use my StatsEnvironment data environment. Now I'm wondering how I refer to my views in my new business object. In my original code, I did something like:
>
>IF !USED('v_Avg')
> USE v_Avg IN 0
>ELSE
> SELECT v_Avg
>ENDIF
>
> Since Codebook handles the lv_Viewname / rv_Viewname stuff, how do I reference my views? The views are actually named: lv_Avg, lv_TotalAmt, etc.
>
> I don't think I'd want to reference them directly using:
> SELECT lv_Avg
>
>since it would break if I was using a remote view instead.

Paul,

In your original code, you are opening the views manually, but in Codebook,opening views/tables are controlled in the dataenvironment via the DELoader in the business object. Codebook opens the view with a v_??? alias, so just access the view that way.

HTH

Rex
Previous
Reply
Map
View

Click here to load this message in the networking platform