diff --git a/packages/fcl-db/src/base/db.pas b/packages/fcl-db/src/base/db.pas index f7fb584cbf..36e36038f2 100644 --- a/packages/fcl-db/src/base/db.pas +++ b/packages/fcl-db/src/base/db.pas @@ -1212,7 +1212,6 @@ type Procedure SetAsBlob(const AValue: TBlobData); virtual; Procedure SetAsBoolean(AValue: Boolean); virtual; Procedure SetAsBytes(const AValue: TBytes); virtual; - Procedure SetAsBlobData(const AValue: TBlobData); virtual; Procedure SetAsCurrency(const AValue: Currency); virtual; Procedure SetAsDate(const AValue: TDateTime); virtual; Procedure SetAsDateTime(const AValue: TDateTime); virtual; @@ -1248,7 +1247,7 @@ type Procedure SetBlobData(Buffer: Pointer; ASize: Integer); Procedure SetData(Buffer: Pointer); Property AsBCD : Currency read GetAsCurrency write SetAsBCD; - Property AsBlob : TBlobData read GetAsBytes write SetAsBlobData; + Property AsBlob : TBlobData read GetAsBytes write SetAsBlob; Property AsBoolean : Boolean read GetAsBoolean write SetAsBoolean; Property AsBytes : TBytes read GetAsBytes write SetAsBytes; Property AsCurrency : Currency read GetAsCurrency write SetAsCurrency; diff --git a/packages/fcl-db/src/base/dsparams.inc b/packages/fcl-db/src/base/dsparams.inc index 38a9fdc758..d6d44d98e8 100644 --- a/packages/fcl-db/src/base/dsparams.inc +++ b/packages/fcl-db/src/base/dsparams.inc @@ -593,7 +593,7 @@ var P: Pointer; begin If IsNull then Result:='' - else if (FDataType in [ftBytes, ftVarBytes]) and VarIsArray(FValue) then + else if (FDataType in [ftBytes, ftVarBytes, ftBlob]) and VarIsArray(FValue) then begin SetLength(Result, (VarArrayHighBound(FValue, 1) + 1) div SizeOf(Char)); P := VarArrayLock(FValue); @@ -700,12 +700,6 @@ begin Value:=AValue; end; -procedure TParam.SetAsBlobData(const AValue: TBlobData); -begin - FDataType:=ftBlob; - Value:=AValue; -end; - Procedure TParam.SetAsCurrency(const AValue: Currency); begin FDataType:=ftCurrency; @@ -887,7 +881,7 @@ begin AssignParam(TParam(Source)) else if (Source is TField) then AssignField(TField(Source)) - else if (source is TStrings) then + else if (Source is TStrings) then AsMemo:=TStrings(Source).Text else inherited Assign(Source); @@ -1120,7 +1114,6 @@ begin DatabaseErrorFmt(SBadParamFieldType,[Name],DataSet); end; - end; Procedure TParam.LoadFromFile(const FileName: string; BlobType: TBlobType);