Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Shared Access & Updateable Views
Message
De
01/11/1999 16:41:12
Jill Derickson
Software Specialties
Saipan, CNMI
 
 
À
30/10/1999 17:51:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00284390
Message ID:
00285083
Vues:
31
Erik, I appreciate your help and input on this - SOMEDAY I'll get it straight.

If 2 users are updating the same table, I'm trying to reflect changes that another user makes as soon as possible. I'm having trouble doing this...or at least testing it on my single computer, by running my app twice. First question is, should I be able to test TABLEUPDATE, REQUERY, etc. as it would operate on a network on this computer?

If so, I'm having real trouble getting this straightened out.. I have a grid on a form and the control source is the updateable view. A user clicks on an Edit button and controls are displayed with the data (control source of controls are fields in the view). Ok, two users do this on the same record. One user saves their data first:

IF !TableUpdate( 0, .F., "LV_AgenciesUpdate" ) && write changes - detect if someone else made a change
...etc.

When the second user tries to save their data, the TableUpdate() should fail, I want to display a message then refresh the grid with the changed data. Then the user can decide what to do about it. I'm having trouble displaying the change the other user made...

One confusing thing I just read in the Hacker's Guide is:

REFRESH()

The interactions between changes made to the view and changes others make to the original data are tricky. If you've changed the data, the changes are sent to the source only if you're using row buffering (the default for views) and you refresh multiple records. In that case, it's actually the movement of the record pointer that sends the changes. The rest of the time, if you've changed the data, your changes are sent and changes in the original data don't update the view.

I'm using the optimistic row buffering.

Does the above imply the TABLEUPDATE() alone (by the first user) is NOT enough to be able to access the changed records by the other user (w/a REQUERY)?

Thanks...J
>Most of the systems I write, the client has asks that the most recent changes win, so I just force the TABLEUPDATE(). But in cases where the rules are not that simple, when an update conflict occurs, I just inform the user that someone else has made changes to the record, and ask if the changes should be overwritten. Has worked so far- and even in heavier traffic apps, this almost NEVER happens.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform