Delphi createdataset issues
Some problems with Delphi Clientdataset:
-<METADATA> comes after <ROWDATA> and Delphi 2006 complains about missing metadata. Inverting the 2 blocks solves the problem. Moved the <METADATA> block from 2555 to 2462
- datetime and timestamp are missing time part as mentioned in the comments.
Formatdatetime('yyyymmdd"T"hh:nn:ss', EF.Field.AsDateTime) solves that.
bcd: invalid field type
Line 2087 becomes:
ftBCD: //WIDTH=precision, DECIMALS=scale //negative DECIMALS not allowed !!! oracle does allow negative
scale begin TDOMElement(ColumnNode).SetAttribute('fieldtype', 'fixed'); TDOMElement(ColumnNode).SetAttribute('WIDTH', '20' ); TDOMElement(ColumnNode).SetAttribute('DECIMALS', IntToStr(ExportFields.Fields[ItemCounter].Field.size) ); end;
Note that precision and scale are poorly implemented in sqldb. I checked both oracle and mysql and support for precision and scale is barely present and severely limiting scale values. Reason for the fixed width in above code. 20 should fit double type values since scale is limited to 4. So no exponentes. Haven't tested negative scales as allowed in oracle yet. I know Delphi 2006 crashes on negative values but I can't tell yet if negative scales ripple through to TFieldDef.size.
when a string field contains the > character, the row is not imported but the previous one is duplicated.