Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
View updates wrong row
Message
 
 
À
11/02/2000 11:53:25
Steve Summers
Pima County Superior Court
Tucson, Arizona, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00330770
Message ID:
00331030
Vues:
23
You are using Row Buffering, aren't you? Switch to table buffering [even if you work with 1 record views] so you will have complete control over when an update is fired.

>I have a container that uses a master/detail configuration (the grid is read-only and the master). The recordsource is an updateable view. I use a toolbar for adding new records and saving rows. My problem is as follows: The last field in the detail portion is a textbox (phone number). All other fields get updated during the save() except the last field. After debugging I noticed that when the contaier loses focus the grid afterrowchange fires. This updates all but the phone number field. In my save method on the container I do a tableupdate(.t.,.t.) and requery() the view (to retrieve the newly assigned Primary key). I found that when the container loses focus and the grid after rowchange occurs the view is setting on the first record. The tableupdate statement is replacing the first record’s phone field. If I place a button on the container the update works fine! Why would the container’s lost focus cause the grid to reposition to the first record. I will add that the
>view is indexed. Could this be the problem? I am stumped. Please help….
>
>Thank you in advance.
>
>Steven Summers
Mark McCasland
Midlothian, TX USA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform