PostgreSQL 9.4.10, TSQLQuery, how to assign value to uuid column as parameter lazarus / 16-Databases ---------------------------------------------------------------------- ertank · 2017-03-07 09:26 Hello, Assuming we have following table: Code: [Select]create table foo( autoinc serial not null primary key, id uuid, value integer ); In my application my TSQLQuery.SQL is assigned below text at design time: Code: [Select]insert into foo(id, value) values(:id, :value) If I write a code like: Code: [Select]var   Guid: TGUID; begin   if CreateGUID(Guid) <> 0 then   begin     ShowMessage('Cannot create a GUID. Check hadware.');     Exit;   end;   SQLQuery1.Params[0].AsString := GuidToString(Guid);   SQLQuery1.Params[1].AsInteger := 1;   SQLQuery1.ExecSQL(); end; I get an error message saying that column is of type uuid and expression is of type text. I should cast or rewrite my sql. - I checked, but I cannot seem to find a uuid field type to make my parameter assignment right. - I checked TSQLScript and I could not use parameters in that component. Is there any workaround I can do for this problem? Thanks & regards, -Ertan ---------------------------------------------------------------------- sky_khan · 2017-03-07 12:50 try this, 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 SQLQuery1.Params[0].AsString := GuidToString(Guid);SQLQuery1.Params[0].DataType:=ftGUID; ---------------------------------------------------------------------- ertank · 2017-03-07 15:23 Hi SkyKhan, Your suggestion worked. Thank you.