Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GetNextModified says rec is changed, GetFldState says no
Message
De
23/06/2022 12:50:48
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
GetNextModified says rec is changed, GetFldState says no
Divers
Thread ID:
01684558
Message ID:
01684558
Vues:
63
Running into an odd one. In the Unload of a form (actually, in the form class), we turn off buffering for the main table the form edits. A customer got an error 1545 (table has uncommitted changes) on that code. The error handler loops through all tables and reports their buffering status and whether any records have changes. For the relevant table, GetNextModified() reported a single changed record, but GetFldState() for that record returned all 1's.

This is the relevant code in the error handler. It's inside a loop and also in a CASE statement that ensures it fires only when buffering for the relevant table is 4 or 5. Yes, the table is selected before all this code. (Realize I should add IN to the GO command. I'll do that, but regardless, all lines here are operating on the same table.)
          lnNextChngd = GETNEXTMODIFIED(0) && , ALIAS(), .T.)
          IF m.lnNextChngd = 0
             ? "No changed records"
          ENDIF 
          DO WHILE m.lnNextChngd <> 0
             *-- TEG 5/31/2022 
             * Need to move record pointer first
             GO m.lnNextChngd
             ? RECNO(), ":",  GETFLDSTATE(-1)
             lnNextChngd = GETNEXTMODIFIED(m.lnNextChngd) && , ALIAS(), .T.)
          ENDDO 
Anybody have any ideas why GetNextModified and GetFldState would disagree this way?

Tamar
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform