Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TABLEREVERT and GETFLDSTATE
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00137811
Message ID:
00137835
Views:
31
It sounds like your assuming Row Buffering is in effect. When using a grid bound to a table, your buffer settings are ignored, and the table is forced to Table Buffering.

Try using a routine like this to check for multiple changed records:
x = GETNEXTMODIFIED(0, myTable) 
do while x # 0
	go x in (myTable)
	=tablerevert(.t., myTable) 
	x = GETNEXTMODIFIED(recno(myTable), myTable) 
enddo
Of course it sounds like the real problem is why do you have a dirty buffer when you're in read-only mode. Are you modifying any data programmatically?

>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!
kenweber
GCom2 Solutions
Microsoft Certified Professional

Previous
Next
Reply
Map
View

Click here to load this message in the networking platform