Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Tableupdate behaviour
Message
De
14/11/2002 04:44:41
 
 
À
13/11/2002 22:12:49
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., Nouvelle Zélande
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00722470
Message ID:
00722567
Vues:
11
>Ken
>
>Look at the return value of your Tableupdate command, if it is not .t. , use aerror() to find the reason why tableupdate() is not working.
>
>Regards
>
>JR

Well, your suggestion led me to the answer.

The updateable view was actually from two tables, one main table and a pulled in field from a lookup table. Only fields from the main table were marked to be updated with Tableupdate but for some weird reason, the view was trying to update fields in both tables. Since there was no update key for the field from the lookup it was causing an error.

But it appears that the update is sequential (not a transaction). The tableupdate made the changes to the main table and then tried to update the field from the lookup and caused an error and subsequent tableupdate failure. It also explains why the tablerevert did not have any effect because the changes were already written to the main table.

Still cannot explain why it was trying to update the lookup but I removed the view from my dataenvironment, added it again, recompiled the form and now it is working.

Thanks for your help.

Ken
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform