Subject | RE: [IBO] DML Caching default actions and dialect 3 column names |
---|---|
Author | Thomas Steinmaurer |
Post date | 2002-02-28T23:27:26Z |
IB_Session.CheckForReservedTokens is set to False, but
setting it to True it doesn't work too.
Probably I've found the problem. DML Caching returns
the involved key field columns from IBO$DMLCACHE table,
which are logged with the value _id_ instead of _"id"_
Either the inserted value in IBO$DMLCACHE must include
the double quotes or it should be trapped in TIB_SyncCursor
or somewhere else. IMHO a design decision ;-).
Thomas
setting it to True it doesn't work too.
Probably I've found the problem. DML Caching returns
the involved key field columns from IBO$DMLCACHE table,
which are logged with the value _id_ instead of _"id"_
Either the inserted value in IBO$DMLCACHE must include
the double quotes or it should be trapped in TIB_SyncCursor
or somewhere else. IMHO a design decision ;-).
Thomas
> Thomas Steinmaurer wrote:
> >
> > 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
> >
> > ------------------------ Yahoo! Groups Sponsor Even with the
> global variable
>
> CheckForReservedTokens set to True; ?