Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Opening a View
Message
De
11/03/2004 12:24:24
Mike Sue-Ping
Cambridge, Ontario, Canada
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Opening a View
Divers
Thread ID:
00885275
Message ID:
00885275
Vues:
65
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform