Stream error when using a null guid

in specific cases i’m writing a ‘null guid’ into a TGuidField
const cGFDNullGuid :TGuid = ‘{00000000-0000-0000-0000-000000000000}’;

i’m assigning it using
property gst_SGUID: TGuid read Getgst_SGUIDValue write Setgst_SGUIDValue;
of the strongly typed interface

now applyupdates says it can’t stream an invalid guid:.
when debugging
procedure Bin2_WriteGUIDToStream(Stream: TStream; const Value: string);
the value is ‘’, an empty string?

is this expected behaviour?

using D10.2
DA 9.2.103.1311

can you create a simple testcase that demonstrates this, pls?
you can attach it here or send directly to support@

made a simple test project and have the same issue
i’ll attach it here zipped

testro.rar (117.7 KB)

run the 2 sql’s to build de MS sql db

Thanks, logged as bugs://78850

bugs://78850 got closed with status fixed.

Embt has introduced new behavior in Delphi Tokyo:

procedure TStringField.SetAsGuid(const Value: TGUID);
begin
  if Value = GUID_NULL then
    SetAsString('')
  else
    SetAsString(Value.ToString);
end;

function TStringField.GetAsGuid: TGUID;
var
  S: string;
begin
  S := GetAsString;
  if S <> '' then
    Result := StringToGuid(S)
  else
    Result := GUID_NULL;
end;

workaround: pls update uDAFields.pas as

const EmptyGUID_String = '{00000000-0000-0000-0000-000000000000}';  //added

function TDACustomField.GetValue: Variant;
..
      {$IFDEF DELPHI_TOKYO_UP}                                 // added
      if (DataType = datGuid) then Result := GetAsVariant else // added
      {$ENDIF}                                                 // added
      result := fField.Value;                 
..
function TDACustomField.GetAsString: string;
..
    Result:= inherited GetAsString;
  {$IFDEF DELPHI_TOKYO_UP}                                                   //added
  if (DataType = datGuid) and (Result = '') then Result := EmptyGUID_String; //added
  {$ENDIF}                                                                   //added
...
function TDACustomField.GetAsVariant: variant;
..
    Result:= inherited GetAsVariant;                                    
  {$IFDEF DELPHI_TOKYO_UP}                                              //added
  if (DataType = datGuid) and (VarToStr(Result) = '') then              //added
       Result := EmptyGUID_String;                                      //added
  {$ENDIF}                                                              //added

thx!!

will this be in future releases of DA or not?
(evaluating if we need to pursue some other strategy or not since emb has changes this)
(will ask why they changed this)

yes, it will be present in next beta

thx!

https://quality.embarcadero.com/browse/RSP-19317
https://quality.embarcadero.com/browse/RSP-19246