Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update conflict
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Divers
Thread ID:
00143536
Message ID:
00143553
Vues:
23
>A form based on a view calls another form to add a record. The first form deletes the record. TableUpdate() returns 1585: Update conflict. If, instead of adding just one record, then deleting it, I add a record, then add another, the problem doesn't occur. The rest of this message assumes the first scenario: add-delete-error.
>
>The view has a buffermode of 5. The underlying table has a buffermode of 1. The form's buffermode is 1 or 0 (no difference). The second form's datasession is private. On returning from the second form, the view is requeried. Browsing the view and the underlying table right before the delete shows the (single) record exists in both tables.
>
>I've considered all the obvious things, I think. The fact that add-add-delete-delete works, where add-delete doesn't is what makes this weird.
>
>I've "fixed" the problem by closing the underlying table right before requerying the view. Then the requery opens it again and all is well. It's almost like there was some buffering of the underlying table going on that only is apparent when the view contains no records.

Hi Mark,

This is not a problem. This is the way to trap 'Update Conflict' using Views in VFP.
You must be trying to update same record of the same table from two different session.
There is a property of a View, which sets 'Update Type' of the View. It has three values

- Key and Modified Fields
- Key and Updateable Fields
- Key Fields Only.

You must have 'Key and Modified Fields' set in your view. Change it to 'Key Fields only' and will work.

Bye
Jayesh
- Jayesh
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform