Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
General problem with updatable views VFP 7.0
Message
 
À
09/03/2004 02:31:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00884335
Message ID:
00884399
Vues:
8
Usually problems like you described are related to improper coding.
I would look first for the reason of the key field in the view became empty.

>I don't know if I am just handling views wrong but I am constantly having problems with updatable local views, especially losing the key field value in a view.
>
>This is happening on views that are populated originally from an underlying table. I usually use optimistic table buffering (mode = 5) in my data environment, update the information in the view, call getnextmodified, then
>tableupdate(1,.T.,'viewname').
>
>For the most part this works but on more than one occasion (way too often) an update that worked perfectly fine, will stop working. I usually trace it to the key field in the view record being empty (so it doesn't know what record in the underlying table to update) even though when the view was created by Requery the key field had a value.
>
>I have never been able to figure out exactly when or why it happens or what fixes make it work again. Usually my solution is to delete and recreate the view...that sometimes works. An other practice is to remove the view from the data environment and add it again...that sometimes works. Sometimes it takes several attempts and other guess work before the update begins working again.
>
>I have also had problems with a record newly inserted into views where the keyfield doesn't update to the underlying table even though it does have a value and is marked as updateable in the view definition.
>
>I always check to make sure that the underlying table is not buffered.
>
>Has anyone had similar problems?
>
>Ken
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform