Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Refresh function
Message
De
16/07/2021 11:01:05
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Refresh function
Divers
Thread ID:
01681815
Message ID:
01681815
Vues:
107
Hi all,

I have never really had to use Refresh(). But now I have been asked for one small part of an app where the users have multiple records loaded in a view if "can we know if someone else has just made a change to a record" (I have used optimistic locking up to now).

I looked a Refresh() and CurVal() and have tried to test myself. I have also read Hackers Guide to VFP and it answered some, but not all, my questions:

I am thinking of including a datetime stamp on each record so that I don't have to check all the fields.

Both screens where the editing take place have buffering set to 5 and there are multiple records in each. The users in one screen will typically save their data out after ever record edit. The users in the other "master" screen are seeing records from many users and they want to see the changes others make before potentially making their own changes.

- the notes all say that Refresh() needs to be issued on the current cursor so that the data returned by CurVal() is up to date

- it doesn't seem like Refresh() will refresh an entire view - it seems to be only 1 record at a time; this means I would be moving the record pointer through the master screen for reach record, issuing Refresh(1) and then changing the display to show that a change has been made (probably changing the colour of the row for changed records as a visual clue)

- It seems Refresh() might be kinda kludgy to use - is that the right impression?

Albert
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform