Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Record is not locked
Message
De
10/11/1997 15:47:38
 
 
À
10/11/1997 15:28:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00058934
Message ID:
00059370
Vues:
38
>>>>>>>I have a table set to optinistic Table buffering. I am trying to REPLACE a field. When I do this, I get the error "Record is not locked". Why is this happening?
>>>>>>>
>>>>>>>Ed
>>>>>>
>>>>>>Check the buffering at that point in the code, in case something has overwritten it.
>>>>>
>>>>>I tryed that. The buffering is still set to 5
>>>>
>>>>OK, I know this one's ridiculous, but I'VE done it...
>>>>
>>>>Are you SURE you are replacing in the right table? Remember that if the SELECTed table is at eof() and your are replacing in another table you will NOT get the right results.
>>>>
>>>>HTH
>>>>Barbara
>>>
>>>When I am debuging, it seems to be sitting on that table, but I wonder if it is eof()? I'll check.
>>>-Ed
>>
>>What Barbara is referring to is a bug with VFP that causes a replace to fail in the current table if there is a table in another work area that is at EOF(). This only happens when your field names are not qualified with the alias name. To make sure it is not happening, always include the alias name in your replace statements.
>
>Actually, it was (I guess) about the situation when you really supply right alias names but sit on different table which is EOF(). Here, REPLACE will fail. The solution is to either SELECT correct alias, or use IN clause of REPLACE command.

Ahh.. right you are. Thanks for the correction. As much trouble as this little quirk gave me before I knew about it, you'd think I would know it like the back of my hand.
Erik Moore
Clientelligence
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform