Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
LOCAL VIEWS.....
Message
De
08/12/1999 08:56:58
 
 
À
08/12/1999 07:38:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00299879
Message ID:
00300273
Vues:
26
JOhn- if it is not updatable, why do you need a view for this? There's a ton of trouble you can get yourself into by basing a view on a view, all avoidable by using SQL SELECT instead.

>Good point. I should have specified that when I do it, generally, one or both of the views are not updatable. Generally, I use this scheme for pick lists where I need a cursor of rows that are not in the first view. So, I might have:
>
>View1:
>SELECT * FROM child WHERE child.fk = ?parent.pk &&Updatable
>View2:
>SELECT * FROM sourcetable WHERE sourcetable.fk NOT IN (SELECT sourcetable.fk FROM View1)
>
>>>I do it all the time. One thing to watch out for: Always make sure that the view you need for the second view is open.
>>
>>
>>There is one other thing to watch out for. Both the first and second view are updatable, yes? If you update the first view, have not yet done and explicit or implicit tableupdate() to write to changes to the base tables and then query the second view, the results will be based on the original query results BEFORE you made changes, not on the changed result set.
>>
>>This may not be a problem for you. (Perhaps you are executing both queries before changing any records.) Just a point that is easy to overlook...
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform