by "Geoff Schaller" <geoffx@[EMAIL PROTECTED]
>
Apr 9, 2008 at 10:17 PM
Paulo.
But this exactly the same problem you have with DBF. You either need to
plan and set up double buffering or use transactions to roll back one of
the updates.
You should always re-read the row you intend to update before doing the
write.
Geoff
"Paulo Oliveira" <paulo@[EMAIL PROTECTED]
> wrote in message
news:fe5cdefc-e699-493b-b35b-26bb1b44eea8@[EMAIL PROTECTED]
> Hil all,
>
> How can i solve this problem:
>
> 2 users updating a record in Sqlserver at same time:
>
> Adoserver generate the error:
> Error code: Optimistic concurrency check failed. The row was modified
> outside of this cursor.....
>
> I use adLockOptimistic.
>
> the error is on oSrv:Commit()
>
> this is my Init() code:
> METHOD INIT(oClasse) CLASS ClipAdoServer
> LOCAL cTxtQuery AS STRING
>
> cTxtQuery:="select * from "+AllTrim(oClasse:cTabela);
> +" where "+
> SELF:ListaCondicoes(oClasse:GetChaves(),oClasse:GetValChaves())
>
> SUPER:INit(cTxtQuery,POGetAppObject():oConexaoAdo,adOpenKeyset,
> adLockOptimistic,adCmdText)
>
> TIA
> Paulo Oliveira