function TDABaseField.GetAsBlob: TBlobData;
begin
{$IFDEF Delphi2009UP}
Result := GetAsBytes;
{$ELSE}
Result := AnsiBytesToString(GetAsBytes);
{$ENDIF}
end;
and
uDACore.pas(1316,37) Error: Incompatible type for arg no. 1: Got “TBytes”, expected “AnsiString”
Thanks, DonaldShimoda
Did Adapt like you said, now it look like this:
function TDABaseField.GetAsBlob: TBlobData;
begin
{$IFDEF Delphi2009UP}
Result := GetAsBytes;
// {$ELSE}
// Result := AnsiBytesToString(GetAsBytes);
// {$ENDIF}
//end;
{$ELSE}
{$IFDEF FPC}
Result := GetAsBytes;
{$ELSE}
Result := AnsiBytesToString(GetAsBytes);
{$ENDIF}
{$ENDIF}
end;
procedure TDABaseField.SetAsBlob(const Value: TBlobData);
begin
{$IFDEF Delphi2009UP}
SetAsBytes(Value);
//{$ELSE}
//SetAsBytes(StringToAnsiBytes(Value));
//{$ENDIF}
{$ELSE}
{$IFDEF FPC}
SetAsBytes(Value);
{$ELSE}
SetAsBytes(StringToAnsiBytes(Value));
{$ENDIF}
{$ENDIF}
end;
There seems to be more Problems…
There is also in uDAFields.pas
uDAFields.pas(1295,33) Error: Incompatible types: got “AnsiString” expected “TBytes”
function TDACustomField.GetAsBlob: TBlobData;
begin
{$IFDEF Delphi2009UP}
Result := fField.AsBytes;
{$ELSE}
if fField is TBlobField then
result := TBlobField(fField).Value
else begin
Result := fField.AsString;
end;
{$ENDIF}
end;
function TDABaseField.GetAsBlob: TBlobData;
begin
{$IFDEF DELPHI2009UP_FPC} //changed
procedure TDABaseField.SetAsBlob(const Value: TBlobData);
begin
{$IFDEF DELPHI2009UP_FPC} //changed
update uDAFields.pas as
function TDACustomField.GetAsBlob: TBlobData;
begin
{$IFDEF DELPHI2009UP_FPC} //changed
procedure TDACustomField.SetAsBlob(const Value: TBlobData);
begin
{$IFDEF DELPHI2009UP_FPC} //changed