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)
IF m.lnNextChngd = 0
? "No changed records"
ENDIF
DO WHILE m.lnNextChngd <> 0
GO m.lnNextChngd
? RECNO(), ":", GETFLDSTATE(-1)
lnNextChngd = GETNEXTMODIFIED(m.lnNextChngd)
ENDDO
Anybody have any ideas why GetNextModified and GetFldState would disagree this way?
Tamar