?
Solved

TTable update error - record has been changed by another user

Posted on 2001-08-23
6
Medium Priority
?
622 Views
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.
0
Comment
Question by:pakman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6418718
?maybe

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

Author Comment

by:pakman
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.
0
 
LVL 4

Expert Comment

by:YodaMage
ID: 6419784
Do you have a before update trigger? Just a shot in the dark here...
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 27

Accepted Solution

by:
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)

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

meikl ;-)
0
 

Author Comment

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

Thank you.

Paul
0
 
LVL 27

Expert Comment

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

good luck again

meikl ;-)
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses
Course of the Month14 days, 12 hours left to enroll

770 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