Parameters in update doesn't work
Posted: 16.10.2021, 12:17
Hi,
I have written a project that moves data from one ORACLE database to another. One of the main functions of this project is to transfer the printouts that are in the database in the BLOB column. For a long time, everything worked flawlessly, but after migrating to the latest version of Lazarus, the content of the printouts is reported via TSQL.Params is empty. Below is the code that worked fine until upgraded to the newer version. What's wrong now? As if the parameters stop working?
changes are obviously committed correctly
(I have ZEOS 8.0.0 beta, but in 7.2.14 problem is the same)
I have written a project that moves data from one ORACLE database to another. One of the main functions of this project is to transfer the printouts that are in the database in the BLOB column. For a long time, everything worked flawlessly, but after migrating to the latest version of Lazarus, the content of the printouts is reported via TSQL.Params is empty. Below is the code that worked fine until upgraded to the newer version. What's wrong now? As if the parameters stop working?
Code: Select all
// wpompowanie wzorca itp z buff
begin
MenuGlowne.ZQueryTEST.ParamCheck:= true;
ImportWdwz.ImpWdwzBufDataSet.CreateDataset;
ImportWdwz.ImpWdwzBufDataSet.Edit;
ImportWdwz.ImpWdwzBufDataSet.FieldByName('wydrWDWZ').AsVariant:= wydrWDWZ;
ImportWdwz.ImpWdwzBufDataSet.Post;
MenuGlowne.ZQueryTEST.SQL.Text:= 'begin update wdwz set wydr = :WYDRWDWZ, opis = :OPISWDWZ, opsz = :OPSZWDWZ where id = '+seqWDWZ+'; end;'+#0;
aktualnySQL:= MenuGlowne.ZQueryTEST.SQL.Text;
MenuGlowne.ZQueryTEST.Params[0].LoadFromStream(ImportWdwz.ImpWdwzBufDataSet.CreateBlobStream(ImportWdwz.ImpWdwzBufDataSet.FieldByName('wydrWDWZ'), bmRead), ftBlob);
MenuGlowne.ZQueryTEST.Params.ParamByName('OPISWDWZ').Value:= opisWDWZ;
MenuGlowne.ZQueryTEST.Params.ParamByName('OPSZWDWZ').Value:= opszWDWZ;
MenuGlowne.ZQueryTEST.ExecSQL;
ImportWdwz.ImpWdwzBufDataSet.Active:= false;
MenuGlowne.ZQueryTEST.ParamCheck:= false;
end;
(I have ZEOS 8.0.0 beta, but in 7.2.14 problem is the same)