Mike Sue-Ping
Cambridge, Ontario, Canada
General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only