Browse Source

+ Added AsInteger to TField. Maps to AsLongint for now

michael 21 years ago
parent
commit
c1a43ddf5d
2 changed files with 23 additions and 2 deletions
  1. 7 1
      fcl/db/db.pp
  2. 16 1
      fcl/db/fields.inc

+ 7 - 1
fcl/db/db.pp

@@ -213,6 +213,7 @@ type
     function GetAsDateTime: TDateTime; virtual;
     function GetAsFloat: Extended; virtual;
     function GetAsLongint: Longint; virtual;
+    function GetAsInteger: Longint; virtual;
     function GetAsString: string; virtual;
     function GetCanModify: Boolean; virtual;
     function GetDataSize: Word; virtual;
@@ -229,6 +230,7 @@ type
     procedure SetAsDateTime(AValue: TDateTime); virtual;
     procedure SetAsFloat(AValue: Extended); virtual;
     procedure SetAsLongint(AValue: Longint); virtual;
+    procedure SetAsInteger(AValue: Longint); virtual;
     procedure SetAsString(const AValue: string); virtual;
     procedure SetDataType(AValue: TFieldType);
     procedure SetSize(AValue: Word); virtual;
@@ -250,6 +252,7 @@ type
     property AsDateTime: TDateTime read GetAsDateTime write SetAsDateTime;
     property AsFloat: Extended read GetAsFloat write SetAsFloat;
     property AsLongint: Longint read GetAsLongint write SetAsLongint;
+    property AsInteger: Integer read GetAsInteger write SetAsInteger;
     property AsString: string read GetAsString write SetAsString;
     property AttributeSet: string read FAttributeSet write FAttributeSet;
     property Calculated: Boolean read FCalculated write FCalculated;
@@ -1474,7 +1477,10 @@ end.
 
 {
   $Log$
-  Revision 1.12  2003-11-09 21:23:10  michael
+  Revision 1.13  2004-02-25 16:29:26  michael
+  + Added AsInteger to TField. Maps to AsLongint for now
+
+  Revision 1.12  2003/11/09 21:23:10  michael
   + Patch from Micha Nelissen, fixing some Delphi compatibility issues
 
   Revision 1.11  2003/10/06 17:04:27  florian

+ 16 - 1
fcl/db/fields.inc

@@ -309,6 +309,12 @@ begin
   AccessError(SInteger);
 end;
 
+function TField.GetAsInteger: Integer;
+
+begin
+  Result:=GetAsLongint;
+end;
+
 function TField.GetAsString: string;
 
 begin
@@ -449,6 +455,12 @@ begin
   AccessError(SInteger);
 end;
 
+procedure TField.SetAsInteger(AValue: Integer);
+
+begin
+  SetAsLongint(AValue);
+end;
+
 procedure TField.SetAsString(const AValue: string);
 
 begin
@@ -1776,7 +1788,10 @@ end;
 
 {
   $Log$
-  Revision 1.8  2003-09-14 13:22:14  michael
+  Revision 1.9  2004-02-25 16:29:26  michael
+  + Added AsInteger to TField. Maps to AsLongint for now
+
+  Revision 1.8  2003/09/14 13:22:14  michael
   + Fixed error in TField.GetCanModify reported by Andrew Johnson
 
   Revision 1.7  2002/09/07 15:15:23  peter