General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>>I'm receiving the error "Table buffer for alias intrancust contains uncommitted changes" when I attempt to edit a row. I'm using Table Buffering.
>>
>>What do I use to clear those uncommitted changes?
>>
>
>You have to issue a TABLEUPDATE() or TABLEREVERT() as appropriate; the odds are that you've got buffered changes to data and you're closing a view or table accidentally (or intentionally) when you 'edit'.
When the error occurs, the debugger points to the Requery() immediately following a tableupdate(). Here's the code:
Load:
DBSETPROP('intrancust', 'view', 'Tables', 'Tomparco!inventory')
DBSETPROP('intrancust', 'view', 'SendUpdates',.T.)
=CURSORSETPROP("Buffering", 3, "intrancust")
INDEX ON stocknum TAG stocknum
=CURSORSETPROP("Buffering", 5, "intrancust")
Init:
Thisform.Inventory_Search() && <-This is also in the interactivechange of combo1
Inventory_Search():
GO TOP
SEEK Thisform.Combo1.value
IF FOUND()
Thisform.Combo1.value = stocknum
Thisform.Text3.VALUE = cut
Thisform.Text10.VALUE = colors
Thisform.Text11.VALUE = clarity
ENDIF
Editbutton Click Event:
ThisForm.Combo1.Enabled = .F. &&Locks Combo1
Thisform.Combo2.Visible = .T. &&takes the place of Text3
Thisform.Combo3.Visible = .T. &&takes the place of Text10
Thisform.Combo4.Visible = .T. &&takes the place of Text11
Thisform.Text3.Visible = .F.
Thisform.Text10.Visible = .F.
Thisform.Text11.Visible = .F.
ThisForm.Combo2.displayvalue = cut
ThisForm.Combo3.displayvalue = colors
ThisForm.Combo4.displayvalue = clarity
Save:
REPLACE cut WITH Thisform.Combo2.Displayvalue
REPLACE colors WITH Thisform.Combo3.Displayvalue
REPLACE clarity WITH Thisform.Combo4.Displayvalue
TableUpdate(0,.T.,"intrancust")
&&Tablerevert(.F., 'intrancust')
REQUERY('intrancust') &&...I stopped here because this is where the error occurs
Any Ideas?
JD
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only