http://www.mofeel.net/110-microsoft-public-fox-programmer-exchange/5596.aspx
http://support.microsoft.com/KB/249836
Table buffer for alias "name" contains uncommitted changes. (1545)
The problem manifests itself when I load data, modify it and load the next record. When that happens it throws Error #1545 Table buffer for alias "My_Cursor" contains uncommitted changes. I have been able to solve the problem by closing the cursor before I reload the new data. I missed this required step before.
---solution
create index on that vfp table
---------CHECK FOXPRO VIEW
MAIN.DBC
MODI CONNECTION
MODI VIEW
alter system flush buffer_cache;
alter system flush shared_pool;
----------
seems like you have the table set to Buffering = 5 Table. So when you skip
it will not save the record. either change the buffering to a 3 Record, or
do an implicit Tableupdate(). The record is not being saved, that's all
SET MULTILOCKS ON
=CURSORSETPROP("Buffering",3)
-------------
Appending a record to a view with
buffered changes is allowed and would
just add that buffered, depending on the
buffermode.
Have you SET MULTILOCKS ON?
What buffermode do you use?
If you are using remote views only
buffermode 3 and 5 are allowed, so
only optimistic buffering is possible.
---------------------
When I fill a row/column in the grid ( DETAILBILL Table), display error :
CursorSetProp("buffering",THIS.oldBuffering,aTablesUsed([m.i,1]) && optimistic table buffering
Error: 1545
Table buffer for alias "DETAILBILL" contains uncommitted changes
Line 67
My code in form destroy event :
SELECT DETAILBILL
TABLEUPDATE(.T.)
You cannot change the buffering mode when there are uncommitted changes in the buffer. These changes are saved to the disk when you issue TABLEUPDATE() but your TABLEUPDATE() is issued after the CursorSetProp probably. To save changes made to your data in Destroy event is too late.
In versions prior to Visual FoxPro 9, using a SQL SELECT statement meant that the results were always pulled from disk. This meant that if you wanted to query uncommitted changes from a buffered table, you were forced to use procedural commands. Now it's possible to specify for each table in a SELECT statement whether to read from the disk or from the local buffer using SET SQLBUFFERING and SELECT ... WITH (Buffering = <lexpr>).
Some examples of how to use WITH (BUFFERING ...) include:
SELECT * FROM Customer WITH (BUFFERING = .t.)
SELECT * FROM Orders WITH (BUFFERING = lUseBuffer)
SELECT DISTINCT c.city, o.shipcity ;
FROM customers C WITH (BUFFERING=.T.) ;
JOIN orders O WITH (BUFFERING=.T.) ;
ON c.customerID = o.customerID
No comments:
Post a Comment