Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Another 'Record in use by another user' message.
Message
From
09/12/1997 12:19:45
Shihchau Tai
Apic Systems Pte Ltd
Singapore, Singapore
 
 
To
09/12/1997 08:51:46
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00064605
Message ID:
00064713
Views:
34
>>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 :(
>
>I'm a little confused here:
>- Is it a cursor or a view? You can't modify data in a cursor
>- Do you do the REPLACE in the view (which is not updatable)? If so, you have to make it updatable if you want to modify it

I have seen this error again and again. I am currently experiencing 'File is in use by another user'. There are generally a few things I found.

Sometimes, when the grid's cursor position gets out of syn with the table/view record pointer, you get one of the two errors. Also, you have to be very careful when you save and restore record pointer. To be safe, do 'RECNO('XXX')' with the alias instead of assuming the current alias. Also, try to do GO (area) IN xxxx instead of just GO (area)..

BTW, I can get rid of 'File is in use' by just having a MESSAGEBOX prompt before BEGIN TRANSACTION.

What can I say? I guess that is why VFP never gets popular with developers.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform