Subject | Re: [IBO] DML Caching Again |
---|---|
Author | Markus Ostenried |
Post date | 2001-03-20T02:10:52Z |
Tony,
I just read Jason's comment:
things in a non-buffered dataset way. Look at the code for the
TIB_SyncCursor to see the code that uses DML caching system.
<<<
Here's an example of what I think he is talking about:
procedure TForm1.IB_StoredProc1AfterExecute( Sender: TIB_Statement );
var
KeyFieldNames: String;
KeyValues : Variant;
ActionType : TIB_DMLCacheItemType;
begin
KeyFieldNames := 'FIELD1;FIELD2';
ActionType := ditInsert; // ditEdit, ditDelete
KeyValues := VarArrayCreate( [0, 1], varVariant );
KeyValues[0] := IB_StoredProc1.Params[0].Value;
KeyValues[1] := IB_StoredProc1.Params[1].Value;
IB_StoredProc1.IB_Connection.ProcessDMLCacheItem( KeyFieldNames,
KeyValues, ActionType );
end;
HTH,
Markus
I just read Jason's comment:
>>>You need to manually initiate the DMLCacheItem notifications when doing
things in a non-buffered dataset way. Look at the code for the
TIB_SyncCursor to see the code that uses DML caching system.
<<<
Here's an example of what I think he is talking about:
procedure TForm1.IB_StoredProc1AfterExecute( Sender: TIB_Statement );
var
KeyFieldNames: String;
KeyValues : Variant;
ActionType : TIB_DMLCacheItemType;
begin
KeyFieldNames := 'FIELD1;FIELD2';
ActionType := ditInsert; // ditEdit, ditDelete
KeyValues := VarArrayCreate( [0, 1], varVariant );
KeyValues[0] := IB_StoredProc1.Params[0].Value;
KeyValues[1] := IB_StoredProc1.Params[1].Value;
IB_StoredProc1.IB_Connection.ProcessDMLCacheItem( KeyFieldNames,
KeyValues, ActionType );
end;
> Markus, thanks for Your patience and competence.Your welcome,
> Thanks,
> Ciao
> Tony.
HTH,
Markus