View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005887 | JEDI VCL | 00 JVCL Components | public | 2012-05-21 15:43 | 2012-09-10 14:15 |
Reporter | altaveron | Assigned To | obones | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.40 | ||||
Target Version | Fixed in Version | 3.46 | |||
Summary | 0005887: TJvDBGrid displays NULL in DateTime field as 30.12.1899 | ||||
Description | 1. Open TADOQuery with NULL in DateTime field. TJvDBGrid displays NULL in DateTime field as 30.12.1899. TJvDBGrid should display NULL as empty field in DateTime field. | ||||
Tags | No tags attached. | ||||
|
May be caused by "fix" of issue#5581. |
|
NULL date should be set on code or by SQL query. Not by user input on the grid. |
2012-05-21 16:27
|
|
|
Sorry! The issue caused by the following line on the source code: JvMemoryData1.LoadFromDataSet(JvAdoQuery1, 0, lmAppend); LoadFromDataSet copies NULL to 30.12.1899 in date field. THIS IS LoadFromDataSet ISSUE! |
|
The issue on the code: procedure AssignRecord(Source, Dest: TDataSet; ByName: Boolean); var I: Integer; F, FSrc: TField; begin if not (Dest.State in dsEditModes) then _DBError(SNotEditing); if ByName then begin for I := 0 to Source.FieldCount - 1 do begin F := Dest.FindField(Source.Fields[I].FieldName); if (F <> nil) and (F.DataType <> ftAutoInc) then begin case F.DataType of ftString: F.AsString := Source.Fields[i].AsString; ftInteger: F.AsInteger := Source.Fields[i].AsInteger; ftBoolean: F.AsBoolean := Source.Fields[i].AsBoolean; ftFloat: F.AsFloat := Source.Fields[i].AsFloat; ftCurrency: F.AsCurrency := Source.Fields[i].AsCurrency; ftDate: F.AsDateTime := Source.Fields[i].AsDateTime; ftDateTime: F.AsDateTime := Source.Fields[i].AsDateTime; else F.Value := Source.Fields[I].Value; end; end; end; end else begin for I := 0 to Min(Source.FieldDefs.Count - 1, Dest.FieldDefs.Count - 1) do begin F := Dest.FindField(Dest.FieldDefs[I].Name); FSrc := Source.FindField(Source.FieldDefs[I].Name); if (F <> nil) and (FSrc <> nil) and (F.DataType <> ftAutoInc) then begin case F.DataType of ftString: F.AsString := FSrc.AsString; ftInteger: F.AsInteger := FSrc.AsInteger; ftBoolean: F.AsBoolean := FSrc.AsBoolean; ftFloat: F.AsFloat := FSrc.AsFloat; ftCurrency: F.AsCurrency := FSrc.AsCurrency; ftDate: F.AsDateTime := FSrc.AsDateTime; ftDateTime: F.AsDateTime := FSrc.AsDateTime; else F.Value := FSrc.Value; end; end; end; end; end; |
|
The same issue: 0005804 |
|
This is now fixed in SVN |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-05-21 15:43 | altaveron | New Issue | |
2012-05-21 15:47 | altaveron | Note Added: 0019771 | |
2012-05-21 16:25 | altaveron | Note Added: 0019772 | |
2012-05-21 16:27 | altaveron | File Added: issue.png | |
2012-05-21 16:50 | altaveron | Note Added: 0019773 | |
2012-05-21 16:54 | altaveron | Note Added: 0019774 | |
2012-05-21 16:57 | altaveron | Note Added: 0019775 | |
2012-06-06 09:49 | obones | Relationship added | related to 0005804 |
2012-06-11 17:34 | obones | Status | new => feedback |
2012-06-11 17:35 | obones | Relationship added | has duplicate 0005882 |
2012-06-12 15:53 | obones | Note Added: 0019923 | |
2012-06-12 15:53 | obones | Status | feedback => resolved |
2012-06-12 15:53 | obones | Fixed in Version | => Daily / SVN |
2012-06-12 15:53 | obones | Resolution | open => fixed |
2012-06-12 15:53 | obones | Assigned To | => obones |
2012-09-10 14:15 | obones | Fixed in Version | Daily / SVN => 3.46 |