Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Normalization question
Message
De
27/10/1998 16:45:41
 
 
À
27/10/1998 16:26:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00149947
Message ID:
00151277
Vues:
23
Hiya Jim ----

>I'm gonna play with this a little and see what kind of results I get staying with Normalized data. I didn't consider using views as you suggested. I don't use views much, so excuse my questions if they come off sounding ignorant. If I'm using databound controls to a table, how do I get the form to rerun the query behind the view when I move to another customer (I'm assuming the control in question is data bound to the view)? How do I relay the current customer as the new parameter for the view when I do navigate?
>

This creates the view (run it once and the view is stored in the database)

CREATE VIEW myview AS ;
SELECT * FROM childtable WHERE childtable.cust_id=?parenttable.cust_id

With parenttable and myview open, all you really have to do to resynch myview is =REQUERY('myview') when the parent record changes.

>BTW, there aren't any tiered issues here, but if there where I guess I don't understand why I would need a seperate app object to perform this logic. Why couldn't I use a remote view or provide logic in a method of the form?
>

Well....you could. But there is a move in development these days to isolate the presentation tier (UI, forms) from the business tier (business rules, validation). Do whatever is comfortable for you as long as it works and then read up on theory and use whatever you are comfortable with :-)
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform