mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 19:49:31 +02:00
* added const to SetIndex declaration
* implemented TField.GetClassDesc * TBlobField.AsString now returns an empty string if the field is null, and displaytext returns (blob) git-svn-id: trunk@6280 -
This commit is contained in:
parent
8865987fb3
commit
03c9f47f2d
@ -274,7 +274,7 @@ type
|
||||
FProviderFlags : TProviderFlags;
|
||||
Function GetIndex : longint;
|
||||
procedure SetAlignment(const AValue: TAlignMent);
|
||||
procedure SetIndex(AValue: Integer);
|
||||
procedure SetIndex(const AValue: Integer);
|
||||
Procedure SetDataset(AValue : TDataset);
|
||||
function GetDisplayText: String;
|
||||
function GetEditText: String;
|
||||
@ -305,6 +305,7 @@ type
|
||||
function GetOldValue: variant; virtual;
|
||||
function GetAsString: string; virtual;
|
||||
function GetCanModify: Boolean; virtual;
|
||||
function GetClassDesc: String; virtual;
|
||||
function GetDataSize: Word; virtual;
|
||||
function GetDefaultWidth: Longint; virtual;
|
||||
function GetDisplayName : String;
|
||||
|
@ -474,7 +474,7 @@ end;
|
||||
function TField.GetAsString: string;
|
||||
|
||||
begin
|
||||
Raise AccessError(SString);
|
||||
Result := GetClassDesc;
|
||||
end;
|
||||
|
||||
function TField.GetOldValue: Variant;
|
||||
@ -545,6 +545,16 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TField.GetClassDesc: String;
|
||||
var ClassN : string;
|
||||
begin
|
||||
ClassN := copy(ClassName,2,pos('Field',ClassName)-2);
|
||||
if isNull then
|
||||
result := '(' + LowerCase(ClassN) + ')'
|
||||
else
|
||||
result := '(' + UpperCase(ClassN) + ')';
|
||||
end;
|
||||
|
||||
function TField.GetData(Buffer: Pointer): Boolean;
|
||||
|
||||
begin
|
||||
@ -637,7 +647,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TField.SetIndex(AValue: Integer);
|
||||
procedure TField.SetIndex(const AValue: Integer);
|
||||
begin
|
||||
if FFields <> nil then FFields.SetFieldIndex(Self, AValue)
|
||||
end;
|
||||
@ -2228,7 +2238,7 @@ begin
|
||||
Free
|
||||
end
|
||||
else
|
||||
Result := '(blob)';
|
||||
Result := '';
|
||||
end;
|
||||
|
||||
function TBlobField.GetAsVariant: Variant;
|
||||
@ -2280,7 +2290,7 @@ end;
|
||||
procedure TBlobField.GetText(var TheText: string; ADisplayText: Boolean);
|
||||
|
||||
begin
|
||||
TheText:=GetAsString;
|
||||
TheText:=inherited GetAsString;
|
||||
end;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user