Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

TTable update error - record has been changed by another user

Posted on 2001-08-23
6
Medium Priority
?
628 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

604 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