TTable update error - record has been changed by another user

Posted on 2001-08-23
Medium Priority
Last Modified: 2010-04-04
I am working with Delphi 5 Enterprise, and accessing a MSSQL 7.0 database through the native MSSQL BDE driver.  On a table that I am trying to update opened with a TTable object, when I call Edit, I get the error message "Couldn't perform update because the record has been changed by another user".  Append works just fine.

On Borland's site, I found two references to this, one relating to Sybase and CTLIB with small datetimes, and the other on using SET NOCOUNT ON.  Neither of these applies to my situation.

Other tables are updating just fine, and I don't see anything obviously wrong.

Any help would be greatly appreciated.  Thank you.
Question by:pakman
  • 3
  • 2
LVL 27

Expert Comment

ID: 6418718

try to change the updatemode-property of the ttable  to upwherekeyonly

Author Comment

ID: 6419547
I had tried setting UpdateMode to upWhereChanged earlier, that didn't work.  I just tried your solution, and that didn't do anything either.

Expert Comment

ID: 6419784
Do you have a before update trigger? Just a shot in the dark here...
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

LVL 27

Accepted Solution

kretzschmar earned 600 total points
ID: 6419849
something from this table must be different from the others tables

as yodamage said are there triggers
or checks or autonumber fields?

the problem seems to be that the record cannot be reallocated before update

maybe it helps to set the cachedupdates to true and call
the applyupdates in the afterpost-event
(with upwherekeyonly in the updatemode-property)

using a tquery instead a ttable with a TUpdateSQL as UpdateObject (property of TQuery)

meikl ;-)

Author Comment

ID: 6422002
Setting CachedUpdates to True and UpdateMode to upWhereKeyOnly did the trick.

Thank you.

LVL 27

Expert Comment

ID: 6424527
well, glad you got it work,
thanks for the points :-)

good luck again

meikl ;-)

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This is an update to some code that someone else posted on Experts Exchange. It is an alternate approach, I think a little easier to use, & makes sure that things like the Task Bar will update.
Free Data Recovery software is an advanced solution from Kernel Tools to recover data and files such as documents, emails, database, media and pictures, etc. It supports recovery from physical & logical drive after a hard disk crash, accidental/inte…
If you are looking for an automated solution for backup single or multiple Office 365 user mailboxes to Outlook data file, then you can use Kernel Office 365 Backup & Restore tool. Go through the video to check out the steps to backup single or mult…

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question