IBDAC : TIBCQuery and TIBCEncryptor

IBDAC : TIBCQuery and TIBCEncryptor

Hello,

TIBCEncryptor work fine with a TIBCQuery connected to a Grid or if you do Dataset.insert or dataset.post.

But it's doesn't seem to work if you add record with a TIBCQuery using execSQL like this  ?

  1. MyQuery:TibcQuery;
  2. MyEncryptor:TibcEncryptor;
  3. ...
  4. begin
  5.   MyQuery.encryption.Encryptor:=MyEncryptor;
  6.   MyQuery.encryption.fields:='MyMemoField';
  7.   MyQuery.sql.text:='insert into Mytable (MyID,MyMemoField) values (:MyId,:MyMemoField)';
  8.   MyQuery.paramByName('MyID').asinteger:=1;
      MyQuery.paramByName('MyMemoField').asMemo:='blablablabla';
  9.   MyQuery.ExecSQL;
  10.   MyQuery.Transaction.CommitRetaining;
  11. end;