Icon View Incident Report

Serious Serious
Reported By: Brian Martin
Reported On: 2/6/2009
For: Version 4.27 Build 3
# 2927 Using Optimistic Locking Can Cause Lost Updates

We have the following update query in our application that isn’t always working. It doesn’t work for me when running against a LocalDatabase using Optimistic locking. Both times the query says it has affected 2 rows however with Optimistic mode, it is lying.

update DelStock
     set DelStock.serviceId=:SQLServiceID
where DelStock.DeliveredID in 
 (
      select DelStock.DeliveredID from delstock
      join service on delstock.orderserviceid=service.serviceid
      where (service.serviceid=:SQLOrigServiceID or
             service.prevserviceid=:SQLOrigServiceID) and     
             DelStock.datedispatched is  null and
             DelStock.datefitted is null and
             DelStock.datereturned is null
)



Comments Comments
The problem was caused by a refresh occurring during the update that caused the current row contents to be reset. This issue was caused by a change in 4.27 Build 3, so only affects that specific build.


Resolution Resolution
Fixed Problem on 2/9/2009 in version 4.27 build 4


Products Affected Products Affected
DBISAM Additional Software and Utilities
DBISAM CLX Client-Server
DBISAM CLX Client-Server with Source
DBISAM CLX Standard
DBISAM CLX Standard with Source
DBISAM ODBC Client-Server
DBISAM ODBC Client-Server with Source
DBISAM ODBC Standard
DBISAM ODBC Standard with Source
DBISAM ODBC Trial
DBISAM VCL Client-Server
DBISAM VCL Client-Server with Source
DBISAM VCL Standard
DBISAM VCL Standard with Source
DBISAM VCL Trial

Image