Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Opening a View
Message
From
11/03/2004 12:24:24
Mike Sue-Ping
Cambridge, Ontario, Canada
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Opening a View
Miscellaneous
Thread ID:
00885275
Message ID:
00885275
Views:
64
I used the VFP8 view designer to create a view. It consists of a main table (TAB_MAIN) and a lookup table (TAB_LOOK). There are two fields in the main table that are numeric codes for which I want the view to display descriptions obtained from the lookup table. Both fields get their character descriptions from the same lookup table.

I created the view by adding the table TAB_LOOK twice. I then edited the resulting SQL to make the aliases say TL_1 and TL_2 instead of VFP defaults of _a and _b.

I can then right click within the view designer and choose "Run Query". All is well. From the datasession, I can see that the lookup table is opened twice with the alises (TL_1 and TL_2) that I want.

The problem that I've run into is that when I open the view with something like USE(mydbc!myview), the lookup table is opened only once with its default alias! The data of view itself looks fine, but the tables opened are not what I expected. I want it to be the same as "Run Query".

How can I force the view to be opened with the correct aliases the way the "Run Query" does it? Why is it different?


TIA

Mike
Next
Reply
Map
View

Click here to load this message in the networking platform