Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to programmatically add a table to a view?
Message
 
 
À
12/07/1998 14:25:13
Larry Long
ProgRes (Programming Resources)
Georgie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00116567
Message ID:
00116634
Vues:
21
Larry,

No, their isn't a way to automatically add the parent table to the DE of a form if you drag a view out of the PM onto the form. You'll have to do it by hand.

With the project hooks in VFP6 you might be able to do this.

You don't put the parent table in the view FROM. Here's one of my coded views for example:
create sql view windowsview as;
SELECT windows.iID, cWindowLetter,;
  nQuantity, nWidth, nHeight,;
  nCostPerSqFt, nPrice, lNameplate,;
  lProtectiveCovering, lLightbox, lFrames,;
  lFinalMeasurement, ;
  CodesStyle.cValue as cWindowStyle, ;
  CodesTop.cValue as cWindowTop ;
  FROM  windows ;
  INNER JOIN codes as CodesStyle;
     ON  windows.iStyle = CodesStyle.iID;
  INNER JOIN codes as CodesTop;
     ON  windows.iTopShape = CodesTop.iID ;
 WHERE windows.iProject = ?Projects.iID ;
 order by cWindowLetter
This view grabs all child windows for a project linking in two lookup fields from the codes table.

>Now...Is there a way to "add" the parent table to the view so I don't have to remember to add it to the DE? I just tried adding the parent to the FROM clause and it is pulling in records from other than the selected parent record. I am testing it thru the command box, by selecting the target parent record, then issuing a REQUERY.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform