Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Tableupdate behaviour
Message
From
14/11/2002 04:44:41
 
 
To
13/11/2002 22:12:49
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., New Zealand
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00722470
Message ID:
00722567
Views:
10
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform