Browse Source

+ Patch from Joost van der Sluis to implement Modified and UpdateRecord event

michael 21 years ago
parent
commit
d13640a706
2 changed files with 11 additions and 4 deletions
  1. 6 2
      fcl/db/dataset.inc
  2. 5 2
      fcl/db/db.pp

+ 6 - 2
fcl/db/dataset.inc

@@ -839,7 +839,7 @@ end;
 Procedure TDataset.SetModified(Value: Boolean);
 
 begin
-  //!! To be implemented
+  FModified := value;
 end;
 
 Procedure TDataset.SetName(const Value: TComponentName);
@@ -1471,6 +1471,7 @@ Procedure TDataset.Post;
 begin
   if State in [dsEdit,dsInsert] then
     begin
+    DataEvent(deUpdateRecord,0);
     DataEvent(deCheckBrowseMode,0);
 {$ifdef dsdebug}
     writeln ('Post: checking required fields');
@@ -1684,7 +1685,10 @@ end;
 
 {
   $Log$
-  Revision 1.18  2004-08-13 07:06:02  michael
+  Revision 1.19  2004-08-14 12:46:36  michael
+  + Patch from Joost van der Sluis to implement Modified and UpdateRecord event
+
+  Revision 1.18  2004/08/13 07:06:02  michael
   + Rework of buffer management by Joost Van der Sluis
 
   Revision 1.17  2004/08/03 19:08:48  michael

+ 5 - 2
fcl/db/db.pp

@@ -1008,7 +1008,7 @@ type
     property FieldDefs: TFieldDefs read FFieldDefs write FFieldDefs;
 //    property Fields[Index: Longint]: TField read GetField write SetField;
     property Found: Boolean read FFound;
-    property Modified: Boolean read FModified;
+    property Modified: Boolean read FModified write SetModified;
     property IsUniDirectional: Boolean read FIsUniDirectional write FIsUniDirectional default False;
     property RecordCount: Longint read GetRecordCount;
     property RecNo: Longint read FRecNo write FRecNo;
@@ -1500,7 +1500,10 @@ end.
 
 {
   $Log$
-  Revision 1.20  2004-08-13 07:06:02  michael
+  Revision 1.21  2004-08-14 12:46:35  michael
+  + Patch from Joost van der Sluis to implement Modified and UpdateRecord event
+
+  Revision 1.20  2004/08/13 07:06:02  michael
   + Rework of buffer management by Joost Van der Sluis
 
   Revision 1.19  2004/07/25 11:32:40  michael