You've already forked lazarus-ccr
RxFPC:fix compile ex_rx_xml_datapacket
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9097 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -91,59 +91,63 @@ implementation
|
||||
|
||||
uses xmlwrite, xmlread, rxdconst;
|
||||
|
||||
const
|
||||
XMLFieldtypenames : Array [TFieldType] of String[15] =
|
||||
(
|
||||
'Unknown', //ftUnknown
|
||||
'string', //ftString,
|
||||
'i2', //ftSmallint,
|
||||
'i4', //ftInteger,
|
||||
'i4', //ftWord,
|
||||
'boolean', //ftBoolean,
|
||||
'r8', //ftFloat,
|
||||
'r8', //ftCurrency,
|
||||
'fixed', //ftBCD,
|
||||
'date', //ftDate,
|
||||
'time', //ftTime,
|
||||
'datetime', //ftDateTime,
|
||||
'bin.hex', //ftBytes,
|
||||
'bin.hex', //ftVarBytes,
|
||||
'i4', //ftAutoInc,
|
||||
'bin.hex', //ftBlob,
|
||||
'bin.hex', //ftMemo,
|
||||
'bin.hex', //ftGraphic,
|
||||
'bin.hex', //ftFmtMemo,
|
||||
'bin.hex', //ftParadoxOle,
|
||||
'bin.hex', //ftDBaseOle,
|
||||
'bin.hex', //ftTypedBinary,
|
||||
'', //ftCursor,
|
||||
'string', //ftFixedChar,
|
||||
'string', //ftWideString,
|
||||
'i8', //ftLargeint,
|
||||
'', //ftADT,
|
||||
'', //ftArray,
|
||||
'', //ftReference,
|
||||
'', //ftDataSet,
|
||||
'', //ftOraBlob,
|
||||
'', //ftOraClob,
|
||||
'', //ftVariant,
|
||||
'', //ftInterface,
|
||||
'', //ftIDispatch,
|
||||
'', //ftGuid,
|
||||
'', //ftTimeStamp,
|
||||
'', //ftFMTBcd,
|
||||
'', //ftFixedWideChar,
|
||||
'', //ftWideMemo,
|
||||
function XMLFieldTypeNamesStr(AFieldType:TFieldType):string;
|
||||
begin
|
||||
case AFieldType of
|
||||
ftUnknown:Result:='';
|
||||
ftString:Result:='string';
|
||||
ftSmallint:Result:='i2';
|
||||
ftInteger:Result:='i4';
|
||||
ftWord:Result:='i4';
|
||||
ftBoolean:Result:='boolean';
|
||||
ftFloat:Result:='r8';
|
||||
ftCurrency:Result:='r8';
|
||||
ftBCD:Result:='fixed';
|
||||
ftDate:Result:='date';
|
||||
ftTime:Result:='time';
|
||||
ftDateTime:Result:='datetime';
|
||||
ftBytes:Result:='bin.hex';
|
||||
ftVarBytes:Result:='bin.hex';
|
||||
ftAutoInc:Result:='i4';
|
||||
ftBlob:Result:='bin.hex';
|
||||
ftMemo:Result:='bin.hex';
|
||||
ftGraphic:Result:='bin.hex';
|
||||
ftFmtMemo:Result:='bin.hex';
|
||||
ftParadoxOle:Result:='bin.hex';
|
||||
ftDBaseOle:Result:='bin.hex';
|
||||
ftTypedBinary:Result:='bin.hex';
|
||||
//ftCursor,
|
||||
ftFixedChar:Result:='string';
|
||||
ftWideString:Result:='string';
|
||||
ftLargeint:Result:='i8';
|
||||
//ftADT,
|
||||
//ftArray,
|
||||
//ftReference,
|
||||
//ftDataSet,
|
||||
//ftOraBlob,
|
||||
//ftOraClob,
|
||||
//ftVariant,
|
||||
//ftInterface,
|
||||
//ftIDispatch,
|
||||
//ftGuid,
|
||||
//ftTimeStamp,
|
||||
//ftFMTBcd,
|
||||
//ftFixedWideChar,
|
||||
//ftWideMemo,
|
||||
//ftOraTimeStamp,
|
||||
//ftOraInterval,
|
||||
{$IFDEF RX_USE_DELPHI_EXT_FIELD_TYPES}
|
||||
'' //ftOraTimeStamp,
|
||||
, '' //ftOraInterval,
|
||||
, '' //ftLongWord,
|
||||
, '' //ftShortint,
|
||||
, '' //ftByte,
|
||||
, '' //ftExtended,
|
||||
, '' //ftSingle
|
||||
{$ENDIF}
|
||||
);
|
||||
//ftLongWord,
|
||||
//ftShortint,
|
||||
//ftByte,
|
||||
//ftExtended,
|
||||
//ftSingle
|
||||
{$ENDIF}
|
||||
else
|
||||
Result:='';
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
{ TXMLRxDatapacketReader }
|
||||
@ -206,7 +210,7 @@ begin
|
||||
|
||||
AFieldDef.DataType:=ftUnknown;
|
||||
for iFieldType:=low(TFieldType) to high(TFieldType) do
|
||||
if SameText(XMLFieldtypenames[iFieldType],FTString) then
|
||||
if SameText(XMLFieldTypeNamesStr(iFieldType),FTString) then
|
||||
begin
|
||||
AFieldDef.DataType:=iFieldType;
|
||||
break;
|
||||
@ -242,7 +246,7 @@ begin
|
||||
if Name <> '' then AFieldNode.SetAttribute('fieldname',Name);
|
||||
AFieldNode.SetAttribute('attrname',DisplayName);
|
||||
if size <> 0 then AFieldNode.SetAttribute('width',IntToStr(Size));
|
||||
AFieldNode.SetAttribute('fieldtype',XMLFieldtypenames[DataType]);
|
||||
AFieldNode.SetAttribute('fieldtype',XMLFieldTypeNamesStr(DataType));
|
||||
case DataType of
|
||||
ftAutoInc : begin
|
||||
AFieldNode.SetAttribute('readonly','true');
|
||||
|
Reference in New Issue
Block a user