Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Another 'Record in use by another user' message.
Message
 
À
09/12/1997 08:51:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00064605
Message ID:
00064633
Vues:
32
>>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

It wouldn't surprise me if 'REPLACE WITH' is attempting to do record locking and this is your problem. You also mentioned that the error occurs when you are doing rapid succession replaces. I would recommend that you use GATHER instead of REPLACE WITH. GATHER, with massive replaces, seems to run much faster and I've noticed that many of the 'record locking' problems you might have with REPLACE WITH seem to go away. Try it and see if the problem goes away.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform