Browse Source

+ Patch from Sergey Smirnov to fix TTimeField.AsString

michael 20 years ago
parent
commit
e97b4edd00
2 changed files with 17 additions and 2 deletions
  1. 6 1
      fcl/db/db.pp
  2. 11 1
      fcl/db/fields.inc

+ 6 - 1
fcl/db/db.pp

@@ -561,6 +561,8 @@ type
 { TTimeField }
 { TTimeField }
 
 
   TTimeField = class(TDateTimeField)
   TTimeField = class(TDateTimeField)
+  protected
+    procedure SetAsString(const AValue: string); override;
   public
   public
     constructor Create(AOwner: TComponent); override;
     constructor Create(AOwner: TComponent); override;
   end;
   end;
@@ -1909,7 +1911,10 @@ end.
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.48  2005-04-24 19:21:28  joost
+  Revision 1.49  2005-04-26 15:45:30  michael
+  + Patch from Sergey Smirnov to fix TTimeField.AsString
+
+  Revision 1.48  2005/04/24 19:21:28  joost
   - some fixes in assignment of transactions and databases
   - some fixes in assignment of transactions and databases
 
 
   Revision 1.47  2005/04/13 22:09:15  joost
   Revision 1.47  2005/04/13 22:09:15  joost

+ 11 - 1
fcl/db/fields.inc

@@ -1647,6 +1647,13 @@ begin
   SetDataType(ftTime);
   SetDataType(ftTime);
 end;
 end;
 
 
+procedure TTimeField.SetAsString(const AValue: string);
+Var R : TDateTime;
+begin
+  R:=StrToTime(AVAlue);
+  SetData(@R);
+end;
+
 
 
 
 
 { TBinaryField }
 { TBinaryField }
@@ -2291,7 +2298,10 @@ end;
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.31  2005-04-16 10:02:13  michael
+  Revision 1.32  2005-04-26 15:45:30  michael
+  + Patch from Sergey Smirnov to fix TTimeField.AsString
+
+  Revision 1.31  2005/04/16 10:02:13  michael
   + Patch to show/enter alternate charsets in grid editor.
   + Patch to show/enter alternate charsets in grid editor.
 
 
   Revision 1.30  2005/04/10 22:18:43  joost
   Revision 1.30  2005/04/10 22:18:43  joost