Subject DML Caching default actions and dialect 3 column names
Author Thomas Steinmaurer
Hi,

Using IBO 4.2Fr.

I've located a problem using dialect 3 column names
defined as delimited identifiers with the DML caching
default receive item event in "IBA_BDataset.IMP".

Within the method TIB_BDataset.DefaultDMLCacheReceivedItem(...)

procedure TIB_BDataset.DefaultDMLCacheReceivedItem(
const ADMLCacheItem: TIB_DMLCacheItem);
var
ii: integer;
tmpStr: string;
begin
tmpStr := '';
for ii := 0 to KeyFields.ColumnCount - 1 do
begin
if ii > 0 then
begin
tmpStr := tmpStr + ';';
end;
tmpStr := tmpStr + KeyFields[ii].FieldName;
end;
// -----> if AnsiCompareText( ADMLCacheItem.KeyFieldNames, tmpStr ) = 0
then
begin
KeyFields.Values[ ADMLCacheItem.KeyFieldNames ] :=
ADMLCacheItem.KeyFieldValues;
case ADMLCacheItem.DMLCacheItemType of
ditEdit: InvalidateBookmark( KeyFields.RowData );
ditDelete: DeleteBufferBookmark( KeyFields.RowData );
ditInsert: InsertBufferBookmark( KeyFields.RowData );
end;
end;
end;


Having a table like this:

create table "test table" (
"id" integer not null primary key,
...
);

The comparison of ADMLCacheItem.KeyFieldNames with tmpStr fails,
when the key field is defined with delimited identifiers.

In this situation the values are:

ADMLCacheItem.KeyFieldNames = 'id'
tmpStr = '"id"'

Therefore the default events depending on the DMLCacheItemType
aren't executed. This behaviour is reproducable.

Regards,
Thomas Steinmaurer
IB LogManager 2.0 - The Logging Tool for Interbase/Firebird
http://www.iblogmanager.com