Browse Source

--- Merging r42331 into '.':
U packages/fcl-db/src/base/dbconst.pas
--- Recording mergeinfo for merge of r42331 into '.':
U .
--- Merging r42467 into '.':
U packages/fcl-db/src/base/db.pas
--- Recording mergeinfo for merge of r42467 into '.':
G .
--- Merging r42497 into '.':
U packages/fcl-db/tests/testfieldtypes.pas
--- Recording mergeinfo for merge of r42497 into '.':
G .

# revisions: 42331,42467,42497

git-svn-id: branches/fixes_3_2@42913 -

marco 6 years ago
parent
commit
415c951a87

+ 1 - 1
packages/fcl-db/src/base/db.pas

@@ -428,7 +428,6 @@ type
     property FieldNo: Longint read FFieldNo;
     property FieldNo: Longint read FFieldNo;
     property IsIndexField: Boolean read FIsIndexField;
     property IsIndexField: Boolean read FIsIndexField;
     property IsNull: Boolean read GetIsNull;
     property IsNull: Boolean read GetIsNull;
-    property Lookup: Boolean read GetLookup write SetLookup; deprecated;
     property NewValue: Variant read GetNewValue write SetNewValue;
     property NewValue: Variant read GetNewValue write SetNewValue;
     property Offset: word read FOffset;
     property Offset: word read FOffset;
     property Size: Integer read FSize write SetSize;
     property Size: Integer read FSize write SetSize;
@@ -455,6 +454,7 @@ type
     property LookupDataSet: TDataSet read FLookupDataSet write FLookupDataSet;
     property LookupDataSet: TDataSet read FLookupDataSet write FLookupDataSet;
     property LookupKeyFields: string read FLookupKeyFields write FLookupKeyFields;
     property LookupKeyFields: string read FLookupKeyFields write FLookupKeyFields;
     property LookupResultField: string read FLookupResultField write FLookupResultField;
     property LookupResultField: string read FLookupResultField write FLookupResultField;
+    property Lookup: Boolean read GetLookup write SetLookup stored false; deprecated;
     property Origin: string read FOrigin write FOrigin;
     property Origin: string read FOrigin write FOrigin;
     property ProviderFlags : TProviderFlags read FProviderFlags write FProviderFlags;
     property ProviderFlags : TProviderFlags read FProviderFlags write FProviderFlags;
     property ReadOnly: Boolean read FReadOnly write SetReadOnly;
     property ReadOnly: Boolean read FReadOnly write SetReadOnly;

+ 1 - 1
packages/fcl-db/src/base/dbconst.pas

@@ -91,7 +91,7 @@ Resourcestring
   SOnUpdateError           = 'An error occurred while applying the updates in a record: %s';
   SOnUpdateError           = 'An error occurred while applying the updates in a record: %s';
   SApplyRecNotSupported    = 'Applying updates is not supported by this TDataset descendent';
   SApplyRecNotSupported    = 'Applying updates is not supported by this TDataset descendent';
   SNoWhereFields           = 'No %s query specified and failed to generate one. (No fields for inclusion in where statement found)';
   SNoWhereFields           = 'No %s query specified and failed to generate one. (No fields for inclusion in where statement found)';
-  SNoUpdateFields          = 'No %s query specified and failed to generate one. (No fields found for insert- or update-statement found)';
+  SNoUpdateFields          = 'No %s query specified and failed to generate one. (No fields for insert- or update-statement found)';
   SNotSupported            = 'Operation is not supported by this type of database';
   SNotSupported            = 'Operation is not supported by this type of database';
   SDBCreateDropFailed      = 'Creation or dropping of database failed';
   SDBCreateDropFailed      = 'Creation or dropping of database failed';
   SMaxIndexes              = 'The maximum amount of indexes is reached';
   SMaxIndexes              = 'The maximum amount of indexes is reached';

+ 11 - 2
packages/fcl-db/tests/testfieldtypes.pas

@@ -112,7 +112,7 @@ type
     procedure TestErrorOnEmptyStatement;
     procedure TestErrorOnEmptyStatement;
     procedure TestExceptOnsecClose;
     procedure TestExceptOnsecClose;
 
 
-    procedure TestServerFilter; // bug 15456
+    procedure TestServerFilter; // bug 15456, 35887
     procedure TestRowsAffected; // bug 9758
     procedure TestRowsAffected; // bug 9758
     procedure TestLocateNull;
     procedure TestLocateNull;
     procedure TestLocateOnMoreRecords;
     procedure TestLocateOnMoreRecords;
@@ -2048,6 +2048,15 @@ begin
     Open;
     Open;
     CheckTrue(CanModify, SQL.Text);
     CheckTrue(CanModify, SQL.Text);
     Close;
     Close;
+
+    // tests change of ServerFilter, while DataSet is opened and not all records were fetched
+    PacketRecords:=2;
+    ServerFilter:='ID>=1';
+    Open;
+    CheckEquals(1, FieldByName('ID').AsInteger);
+    ServerFilter:='ID>=21';
+    CheckEquals(21, FieldByName('ID').AsInteger);
+    Close;
   end;
   end;
 end;
 end;
 
 
@@ -2058,7 +2067,7 @@ begin
     begin
     begin
     Query2 := GetNDataset(0) as TSQLQuery;
     Query2 := GetNDataset(0) as TSQLQuery;
 
 
-    AssertEquals(-1, Query.RowsAffected);
+    CheckEquals(-1, Query.RowsAffected, 'Inactive dataset');
     Connection.ExecuteDirect('create table FPDEV2 (' +
     Connection.ExecuteDirect('create table FPDEV2 (' +
                               '  ID INT NOT NULL,  ' +
                               '  ID INT NOT NULL,  ' +
                               '  NAME VARCHAR(250),' +
                               '  NAME VARCHAR(250),' +