Board index » delphi » Can not make the changes because another user changed tha record

Can not make the changes because another user changed tha record

Hello everybody..

I have a problem accesing some records in a SQL Sever table.

When I try to Edit any record in a table and I want post de record it show
me a message
"Can not make the changes because another user changed tha record". Sometime
before edit  a record it show me the same error..

When I try to edit with the SQL Explorer It show me the same error

What Can I do ?...
 Anybody have the solution

P.D. Forgive me the Enghish. I trying to improve it... Thanks

 

Re:Can not make the changes because another user changed tha record


Hi Carlos:

That behavior is called optimistic lock. It happens when the UPDATE SQL stmt
generated by the BDE modify no records ... just because the target record
has been modified by another user. In Paradox, you'll get a lock violation
inmediatly, just when you try to put the record in Edit mode.
In order to minimize those problems, set the UpdateMode property of the
table to upWhereChange. Take a look at my book, "La Cara Oculta de Delphi 4"
... in Spanish!

Ian
www.mar{*word*249}s.com

Re:Can not make the changes because another user changed tha record


Hi Carlos:

That behavior is called optimistic lock. It happens when the UPDATE SQL stmt
generated by the BDE modify no records ... just because the target record
has been modified by another user. In Paradox, you'll get a lock violation
inmediatly, just when you try to put the record in Edit mode.
In order to minimize those problems, set the UpdateMode property of the
table to upWhereChange. Take a look at my book, "La Cara Oculta de Delphi 4"
... in Spanish!

Ian
www.mar{*word*249}s.com

Re:Can not make the changes because another user changed tha record


Carlos

Two simple things to try:

1. Set the UpdateKind of your DataSet component to upWhereKeyOnly

2. Immediately before attempting an edit, issue a refresh (if you're
using a TTable).

Derek Davidson
Get a FREE copy of DK's Audit Components from
http://freespace.{*word*269}.net/d.davidson
Get a FREE copy of the SQL Anywhere table printer. EMail
j...@mksoft.com (but remove the 'x' first)

(Remove the x to EMail me : der...@mksoft.com)

Other Threads