Edit a Record lazarus / 16-Databases ---------------------------------------------------------------------- Weitentaaal · 2024-11-06 14:12 Hello, i have a Record which needs to be Updated. When i first insert the Record everything works. As soon as i try to update, it it wont update (code executed but nothing changed in DB). when i changed update mode from "upWhereAll" to "upWhereChanged" it worked. it worked prior with "upWhereAll" but suddenly i doesn't. this is the Code i use to Update/Edit the Record: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i    //speichern   RsSave.Upda]"]>Blockedde:= upWhereChanged; //upWhereAll   RsSave.Clear;   RsSave.UsePrimaryKeyAsKey:= False;   RsSave.DataBase:= DB_WGR;   RsSave.SQL.Text:= 'SELECT * FROM GERAET WHERE ZEICHNUNG = '+fDevice.ID.ToString+' AND KOMP = 0 AND ART = 0';   RsSave.Open;   RsSave.Edit;   RsSave.FieldByName('ARahmenart').AsInteger:= Ord(fFrameTyp);   RsSave.FieldByName('AGNam').AsString:= fGSize;   RsSave.FieldByName('AgBreit').AsFloat:= fBreit;   RsSave.FieldByName('AgHoch').AsFloat:= fHoch;   RsSave.FieldByName('AlLumeng').AsFloat:= fLuftmenge;   RsSave.FieldByName('AlPaExt').AsFloat:= fPaExt;   RsSave.FieldByName('AlPa').AsFloat:= fPa;   RsSave.FieldByName('AlPaGes').AsFloat:= fPaGes;   RsSave.FieldByName('AlBed').AsInteger:= fBed;   RsSave.FieldByName('AlAn').AsInteger:= fAn;   RsSave.FieldByName('Para2').AsInteger:= fIsSwapped.ToInteger;   RsSave.FieldByName('APauss').AsString:= fPAussen.ToString +';'+ Float2Str(fBlechStarkAussen);   RsSave.FieldByName('APinn').AsString:= fPInnen.ToString +';'+ Float2Str(fBlechStarkInnen);   RsSave.FieldByName('APbod').AsString:= fPBoden.ToString +';'+ Float2Str(fBlechStarkBoden);   RsSave.FieldByName('AGausf').AsInteger:= fGAusf;   RsSave.FieldByName('Z2').AsFloat:= fRaisedByTF;   RsSave.FieldByName('Para4').AsInteger:= 0;   RsSave.Post;   RsSave.ApplyUpdates;   TransWGR.Commit;  am i forced to replace my Transactions with Parameterized Transactions ? Edit: found out there is a Blob Field in the Table that is causing the problem. if i have it then the Records wont update, and if i remove it then the records will update. ---------------------------------------------------------------------- rvk · 2024-11-06 15:34 Quote from: Weitentaaal on November 06, 2024, 03:12:32 pmEdit: found out there is a Blob Field in the Table that is causing the problem. if i have it then the Records wont update, and if i remove it then the records will update. Which is kinda logical because you can't do WHERE BLOB = :OLD_BLOB. BTW. I also wouldn't use upWhereChanged in normal production. It's better to have a normal proper database design and use an ID. With upWhereChanged you could end up with duplicate records (same values in fields) and mess up your whole database. ---------------------------------------------------------------------- jcmontherock · 2024-11-06 15:48 There is also an sql update: update set fieldname= fieldvalue where x=value... ---------------------------------------------------------------------- Weitentaaal · 2024-11-07 12:16 thanks for the Help ! i did Update/edit the Databse this ways beacause i went with this tutorial: "https://wiki.freepascal.org/SqlDBHowto#How_to_change_data_i n_a_table?". Since i always did it like this, i never considered using "SQL Update".