Icon View Incident Report

Minor Minor
Reported By: Gary Mouradian
Reported On: 5/13/2009
For: Version 4.27 Build 5
# 2995 TDBISAMUpdateSQL Not Working Properly with Delete Operations

Im using Delphi 2007 and DBISAM 4.27 Build 5 on Windows Vista.

Im converting a BDE applicaton into DBISAM and Im having a problem with TDBISAMUpdateSQL.

I have a TDBISAMQuery linked to TDBISAMUpdateSQL, however, TDBISAMUpdateSQL is not applying any changes on database tables.

Calling SetParams and ExecSQL in querys BeforePost event makes it work for Posts but I get Update Failed error message when I do the same thing trying to force it to handle the delete using BeforeDelete event.

The DeleteSQL has the following value, and it seems OLD_InvId remains unpopulated even after calling SetParams(ukDelete). The only way I can make this work is by manually populating the value of OLD_InvId.

delete from "inventory" where  InvId = :OLD_InvId

procedure TDM.qryInventoryBeforeDelete(DataSet: TDataSet);
begin
  updInventory.SetParams(ukDelete);
  updInventory.Query[ukDelete].ParamByName('OLD_InvId').AsInteger :=
Dataset.FieldByName('InvId').AsInteger;
  updInventory.ExecSQL(ukDelete);
end;



Comments Comments
The problem was that DBISAM was not properly saving the old values prior to a deletion.


Resolution Resolution
Fixed Problem on 5/16/2009 in version 4.28 build 1


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 VCL Client-Server
DBISAM VCL Client-Server with Source
DBISAM VCL Standard
DBISAM VCL Standard with Source
DBISAM VCL Trial

Image