Bug in TWideStringField !!!

I did a little digging in the DB.PAS unit and found that in general, the the
return value of TField.GetData (boolean) is checked and a default is
provided when GetData returns false (like for a NULL).
TWideStringField.GetAsWideString is the ONLY exception.

Currently it reads like this:

function TWideStringField.GetAsWideString: WideString;
begin
  GetData(@Result, False);
end;

To be consistent with the rest of DB.pas it should read like this:

function TWideStringField.GetAsWideString: WideString;
begin
  if not GetData(@Result, False) then
    Result := '';
end;

Currently, if you encounter a NULL value, it will return the most recent
non-NULL value.

Example:
var
    DataSet: TDataSet;
    F: TWideStringField;
    w: WideString
begin
    ....
    F := DataSet.FieldByName('SomeField') as TWideStringField;
    w := F.Value;  // if underlying value is NOT NULL, correctly returns
value of F, ie.  "First record"
    DataSet.Next;
    w := F.Value;  // if underlying value is NULL, returns "FirstRecord".
It should return empty string.
end;

I'm going to fix this for myself by overriding TDataSet.GetFieldData for my
table.  I'm currently using ADO.DB, so I guess my bug fix will look
something like this:

function TMyADODataSet.GetFieldData(Field: TField; Buffer: Pointer;
NativeFormat: Boolean): Boolean;
begin
  result := inherited GetFieldData(Field, Buffer, NativeFormat);
  if (not result) and (Field is TWideStringField) then
    WideString(Buffer^) := '';
end;