I have a perplexing error that occurs when trying to update a cursor using the
replace statement.
The error generated is 'Record in use by another user.' Which is unapropriate because the
cursor/view is open exclusively in the current datasession. Here is the code that bombs:
replace ;
data_data with m.lcData_Data, ;
longdata_data with m.lcLongdata_data ;
in griddata
** Longdata is a memo
Here is a brief list of foxpro system parameters:
* sys(2011) returns 'Exclusive'
* buffermode is 3 (optimistic row)
* rlock() returns false (but I checked and this seems to be the effect on all views)
* the view recno is on the record to be udpated. (eof, bof are .f.)
* the current alias is griddata, so it shouldn't pose a problem.
* the view is not updatable (its just for visual appearance inside a grid) I update the base table elsewhere.
* calling flush and any combination of tableupdate has no effect on the error message.
* "ignoring" the error causes the data not to be updated (which is unacceptable).
* replace any field in the view results in the same error (ie replace data_data with 'x').
This error only seems to occur when data is entered into the grid in rapid succession, so it may be a timing issue. As far as I can determine, this is NOT a record locking issue like the msg would imply.
Has anyone experienced this and/or knows of a workaround. MS knowledge base is not working this evening so I couldn't check it :(
TIA,
Peter
Peter Stephens
Visual Records, Inc.
Lead Programmer for the general purpose record keeping system Visual Records. Written primarily in VFP 6.0 with a little C++.