I’m facing a realy strange issue.
My SQL code:
CMD.CommandText.Text := 'UPDATE T_MVT_FONDS SET EST_VAL=:EST_VAL,ID_OPE_VAL=:ID_OPE_VAL,DT_OPE_VAL=:DT_OPE_VAL,ID_CHK=:ID_CHK WHERE ID_MVT_FOND=:ID_MVT_FOND ';
CMD.ParamByName('ID_CHK').AsInteger := vIdCheque;
CMD.ParamByName('ID_OPE_VAL').AsInteger := IdOpeVal;
CMD.ParamByName('DT_OPE_VAL').AsDateTime := DtOpeVal;
CMD.ParamByName('EST_VAL').AsInteger := iStatutValidation;
CMD.ParamByName('ID_MVT_FOND').AsInteger := IdMvtFond;
CMD.Execute;
When I use the Firedac Monitor, it shows me as real SQL (e.g) :
UPDATE T_MVT_FONDS SET EST_VAL=1,ID_OPE_VAL=-1,DT_OPE_VAL='2024-05-23 21:07:57.000559',ID_CHK=1167092 WHERE ID_MVT_FOND=1167070
But field ID_CHK is not updated. Other field **are **updated.
Note :
CMD is TFDCommand
vIdCheque type is variant but value is Integer
ID_CHK is INT (11)
Using Delphi XE6 SP1 Version 20.0.16277.1276 / Firedac / MariaDb 10.6 Cloud Database
Application is Win32 / vendorLib is libmysql.dll (5.6.6.0)/Heidi SQL
Thanks
I tried to add other fields (text fields) in my table. There are not updated
I tried to Drop an re create the field.
I Tried to update an existing field. Not working also.
I tried to sort the field in another way in my sql.
I tried to simplify the query : UPDATE T_MVT_FONDS SET ID_CHK=:ID_CHK WHERE ID_MVT_FOND=:ID_MVT_FOND ;
I tried to use TFDQuery instead.
Still not working.
David KARAM is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.