Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strange Update View Results
Message
 
À
06/01/2005 14:45:02
Steven Dyke
Safran Seats USA
Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
00974709
Message ID:
00974809
Vues:
21
It sounds like either there's a bug in your routine to assign the PK, as Jim suggests or there's an error in your update criteria for the view.

Can you post the code you use to assign the new PK?

Is it the parent or the children that are getting overwritten? It sounds like this is really something that is (or should be) handled with two views, not one--one to add the parent and one for the children. What have you defined as the key field(s) for the view(s)?

>I thank you for your intrest in this issue that I have. If you will permit I would like to explain just what my process is that causes the issue. I understand when two people are trying to update the same records but my case is slighty different(I think).
>
>The form used is an input form with the pview in the dataenvironment. The main form drives a parent table(text boxes) and then a grid for the child table(pview). The form comes up in an empty state. The user types in a number and a new parent is added(insert into code) with a unique index number to the parent table. Items are then added to the grid, each with the unique index number of the parent and it's own unique index number(parent index number + item number). The form is closed firing the tableupdate().
>
>All works pretty good except for a rare case like yesterday.
>
>User 1 has his form filled out. There is evidence that a unique index was created for the parent table. There was no indication that anything was wrong. As far as it looks the pview was set with all the proper data to update the associated table.
>
>Apparently at the same time.
>
>User 2 opens the form creates the parent index. Selects a set of existing child records to use as a template(not even remotely connected to the above users input). The template records are insert into the pview.
>
>Just guessing, at this time User 1 closes the form, the TableUpdate() fires. The child records are added with the proper parent index but the data is a copy of user 2's template records or what was currently in the pview of user 2.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform