Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Tableupdate returns false but data is saved
Message
From
05/11/2003 19:45:58
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00846866
Message ID:
00846879
Views:
11
You don't say what version of VFP Doru, but there is the following fix in SP1 of VFP8 that may be relevant:
"Engine - After calling TABLEUPDATE( ) and ROLLBACK command in local view, "Index does not match the table" error occurs on GOTO TOP command.
".
Another probably less relevant was: "Engine - "Index does not match the table...(Error 114)" occurs when calling TABLEUPDATE( ) function on a table-buffered cursor with buffered changes and using REINDEX command.".

good luck


>Details:
>-form with private data session
>-free fox2x table
>-buffering: 5
>-add new record does an "append blank" and puts the table in "adding" mode
>-put some data in controls bound to the fields in the table
>-save code
>
>if not tableupdate(0,.t.,thisform.ParentAlias)
>  messagebox('Update conflict! - record locked by another user.',16)
>  set reprocess to (lnSetReprocess)
>  return .f.
>endif
>
>From time to time we get the message "Update conflict...", which leaves the form in "adding" mode, i.e. save and cancel are the only available options for the user.
>If users press Save again, they may get the message a number of times, and in the end it will succed, and the form goes in "view" mode.
>If users press Cancel, a tablerevert(.t.,thisform.ParentAlias) is issued and the form goes in "view" mode.
>
>Every time when "Save" is pressed, a new record, with all changes is added to the table, even though the tableupdate() returns false.
>On "Cancel", one record is still added to the table.
>
>We know that every time when this happens, the index of the table is broken - if we open the table in FPW 2.6, with the order set to some of the tags in the cdx, and issue go bottom, we get "record out of range". For other tags in the cdx, and for no order set, we don't get any error on go bottom.
>
>The table may go for 2-3 moths without any problem, then there are 2-3-4 days in a row when we have to delete all tags and reindex.
>I guess my main question is: how is it possible to get the record added when tableupdate() returns false?
>TIA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform