Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TABLEREVERT and GETFLDSTATE
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00137811
Message ID:
00137845
Vues:
20
Roxanne,

You may hear differently from others who say this is not necessary - but I've run into various problems where this HAS taken care of problems such as yours.
Try putting a =inkey(.01) between the tablerevert and the requery(). Just for the fun of it. VFP is funny at times, like it gets ahead of itself.

I don't have a answer on the tablerevert error - I'd have to see/know more.

Robert


>Hi all,
>
>This question is coming from a really complicated data entry grid situation that has me puzzled.
>
>User moves to a new record, grid needs to be repopulated with child records for the new ID. A Requery method in a custom Data Environment (prg based) does a TABLEREVERT(.T.,.ALIAS) followed by a REQUERY(.ALIAS). I'm getting an occaisional "Uncommitted changes" error on the REQUERY(.ALIAS) if the user is hitting the Next Record button repeatedly, without waiting on the form to refresh. When I get this error, TABLEREVERT is returning that 2 records were ditched, yet GETFLDSTATE(-1, .ALIAS) done right after the TABLEREVERT tells me the field that the grid sets focus to after after refreshed is changed. Meanwhile the entire form has been ReadOnly, no editing occurred whatsoever, and comparing oldval() to curval() tells me TABLEREVERT should of returned 0.
>
>Yes it's an ugly scenario but my question at this point is simple -
>Is there anything obvious that could cause TABLEREVERT(.T., .ALIAS) command to leave uncommitted changes even though it tells me it actually reverted something? Any other ideas welcome too, and TIA!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform