FB4 replication advice

35 προβολές
Παράβλεψη και μετάβαση στο πρώτο μη αναγνωσμένο μήνυμα

zora...@gmail.com

μη αναγνωσμένη,
7 Ιουλ 2021, 12:52:06 μ.μ.7/7/21
ως firebird...@googlegroups.com
Hello

FB4 replication works (almost) great. In my application I am able to make changes and they get all replicated in replica db, except for BLOB graphics columns.

The weird thing is that from my database manager (Firebird Maestro, RC version supporting FB4) when I update BLOB graphic (image) it gets replicated ok, but not from my code. So, evidently something must be wrong with my code.

Can someone, please, shed some light on what I'm doing wrong here, My code:

ms := TMemoryStream.Create;
try
ms.LoadFromFile(edtBLOBFile.Text);
ms.Position := 0;
DM.qryBLOB.Close;
DM.FDConnection1.StartTransaction;
try
DM.qryBLOB.SQL.Text := 'update DOC_DOKUMENT_BLOB set Doc_BLOB=:blob, LC_User_Id=5 where Id=27';
DM.qryBLOB.Params[0].ParamType := ptInput;
// DM.qryBLOB.Params[0].FDDataType := dtBlob; //makes no difference
DM.qryBLOB.Params[0].LoadFromStream(ms, ftBlob);
DM.qryBLOB.ExecSQL;
DM.FDConnection1.Commit;
except
DM.FDConnection1.Rollback;
raise;
end;
finally
ms.Free;
end;

This code runs fine, no errors. Master table is updated as expected, but change is not replicated after running this code. Replication.log does not show any errors. Now, if I do the same BLOB update (clear BLOB and load different image) in Firebird Maestro - it goes thru and gets replicated ok.

Any hints appreciated.

Thank you

Regards
Zoran

Delphi 10.3.3 Ent, FireDAC, FB4 official release (same happens with Daily Builds), async replication.


Απάντηση σε όλους
Απάντηση στον συντάκτη
Προώθηση
0 νέα μηνύματα