mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-04-07 08:47:49 +02:00
* TBlobField must bet TBinaryField descendent, but needs to allow size 0
This commit is contained in:
parent
8619a9f296
commit
b4fb0f45dd
@ -662,7 +662,7 @@ type
|
||||
TBlobStreamMode = (bmRead, bmWrite, bmReadWrite);
|
||||
// TBlobType = ftBlob..ftMemo;
|
||||
|
||||
TBlobField = class(TField)
|
||||
TBlobField = class(TBinaryField)
|
||||
private
|
||||
FModified : Boolean;
|
||||
// Wrapper that retrieves FDataType as a TBlobType
|
||||
@ -670,6 +670,7 @@ type
|
||||
// Wrapper that calls SetFieldType
|
||||
// procedure SetBlobType(AValue: TBlobType);
|
||||
protected
|
||||
class procedure CheckTypeSize(AValue: Longint); override;
|
||||
function GetBlobSize: Longint; virtual;
|
||||
function GetIsNull: Boolean; override;
|
||||
procedure GetText(var AText: string; ADisplayText{%H-}: Boolean); override;
|
||||
@ -7027,6 +7028,11 @@ end;
|
||||
|
||||
|
||||
|
||||
class procedure TBlobField.CheckTypeSize(AValue: Longint);
|
||||
begin
|
||||
If AValue<0 then
|
||||
DatabaseErrorFmt(SInvalidFieldSize,[AValue]);
|
||||
end;
|
||||
|
||||
function TBlobField.GetBlobSize: Longint;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user