Changeset 8 for trunk/DbEngines
- Timestamp:
- Jan 23, 2015, 12:00:37 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DbEngines/UEngineXML.pas
r7 r8 64 64 I := 0; 65 65 while Assigned(Node2) and (Node2.NodeName = 'Value') and (I < Row.Values.Count) do begin 66 case TField(Row.Parent.Fields[I]). FieldType of66 case TField(Row.Parent.Fields[I]).DataType.FieldType of 67 67 ftString: TValueString(Row.Values[I]).Value := Node2.TextContent; 68 68 ftInteger: TValueInteger(Row.Values[I]).Value := StrToInt(Node2.TextContent); … … 84 84 NewNode := Node.OwnerDocument.CreateElement('Value'); 85 85 Node.AppendChild(NewNode); 86 case TField(Row.Parent.Fields[I]). FieldType of86 case TField(Row.Parent.Fields[I]).DataType.FieldType of 87 87 ftString: NewNode.TextContent := TValueString(Row.Values[I]).Value; 88 88 ftInteger: NewNode.TextContent := IntToStr(TValueInteger(Row.Values[I]).Value); … … 125 125 begin 126 126 Field.Name := ReadString(Node, 'Name', ''); 127 Field. FieldType := TFieldType(ReadInteger(Node, 'Type', 0));127 Field.DataType := Field.Table.Database.Engine.DataTypes.FindByType(TFieldType(ReadInteger(Node, 'Type', 0))); 128 128 Field.TextBefore := ReadString(Node, 'TextBefore', ''); 129 129 Field.TextAfter := ReadString(Node, 'TextAfter', ''); … … 133 133 begin 134 134 WriteString(Node, 'Name', Field.Name); 135 WriteInteger(Node, 'Type', Integer(Field. FieldType));135 WriteInteger(Node, 'Type', Integer(Field.DataType.FieldType)); 136 136 WriteString(Node, 'TextBefore', Field.TextBefore); 137 137 WriteString(Node, 'TextAfter', Field.TextAfter); … … 147 147 while Assigned(Node2) and (Node2.NodeName = 'Field') do begin 148 148 NewField := TField.Create; 149 NewField.Table := Fields.Table; 149 150 LoadNodeField(NewField, Node2); 150 151 Fields.Add(NewField); … … 206 207 while Assigned(Node2) and (Node2.NodeName = 'Table') do begin 207 208 NewTable := TTable.Create; 209 NewTable.Database := Tables.Database; 208 210 LoadNodeTable(NewTable, Node2); 209 211 Tables.Add(NewTable);
Note:
See TracChangeset
for help on using the changeset viewer.