Link to home
Start Free TrialLog in
Avatar of pakman
pakman

asked on

TTable update error - record has been changed by another user

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.
Avatar of kretzschmar
kretzschmar
Flag of Germany image

?maybe

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

ASKER

I had tried setting UpdateMode to upWhereChanged earlier, that didn't work.  I just tried your solution, and that didn't do anything either.
Do you have a before update trigger? Just a shot in the dark here...
ASKER CERTIFIED SOLUTION
Avatar of kretzschmar
kretzschmar
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pakman

ASKER

Setting CachedUpdates to True and UpdateMode to upWhereKeyOnly did the trick.

Thank you.

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

good luck again

meikl ;-)