General information
Category:
Coding, syntax & commands
>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only