[Solved] Different behaviour of Blob type lazarus / 63-Database ---------------------------------------------------------------------- luca · 2022-06-28 09:19 Hi, I've updated a program to last official version of Lazarus. I must change this code 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 var  i:integer;  a:String;  begin....  qry.ParamByName('VAL').AsBlob:=a;....end; to this one 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 var  i:integer;  a:TBytes;  begin....  qry.ParamByName('VAL').AsBlob:=a;....end;  I know probably last version is better than the previous one, BUT I cannot compile the old code because I receive this error: unit1.pas(470,43) Error: Incompatible type for arg no. 1: Got "AnsiString", expected "TBytes" So my question is: what has changed from Lazarus 2.0.12 to Lazarus 2.2.0? Regards Luca ---------------------------------------------------------------------- luca · 2022-06-28 09:26 I found this in the user Changes 3.2.0 https://wiki.freepascal.org/User_Changes_3.2.0#TBlobData_opaque_type_r eworked_to_TBytes QuoteTBlobData opaque type reworked to TBytes Old behaviour: TBlobData was declared as Ansistring New behaviour: TBlobData is declared as TBytes Reason for change: Delphi compatibility. Also helps to avoid possible code page recodings. Remedy: If your application used TBlobData as a string, you can use AsString for parameters, or convert to TBytes.