Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is this a bug?
Message
De
21/07/2002 21:56:24
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00680753
Message ID:
00680977
Vues:
21
Hi, Joe-

>I been trying to figure this out for some time and now I can duplicate
>it. The problem is caused by the updating the field in the table when
>it has an index. Remove the index (or don't update the index field)
>and everything works ok.
>
>Is this a bug?

No, but it sure was a good puzzle. The problem, basically, is that you have both the view and the table the view is based on, buffered. If you close test before using your view (and remove the CursorSetProp for it), then your code works fine. Or, if you TableUpdate Test after the first TableUpdate of View1, your code works fine. I don't know the mechanics of why the view record gets deleted after the second update. Suffice it to say...don't do that. *g*.

Rule of thumb, don't buffer (don't even open if you don't have to) the tables views are based on. Using the view is enough.

That was a good puzzle--would be a heck of an prospective employee question. Nice that you included a runnable example. Thanks.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform