Changeset 29 for trunk/DbEngines/UEngineXML.pas
- Timestamp:
- Sep 10, 2022, 10:54:56 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DbEngines/UEngineXML.pas
r28 r29 98 98 I: Integer; 99 99 begin 100 Row.Values.Count := Row. Parent.Fields.Count;100 Row.Values.Count := Row.Table.Fields.Count; 101 101 for I := 0 to Row.Values.Count - 1 do 102 Row.Values[I] := TValueClass(Row. Parent.Fields[I].GetValueClass).Create;102 Row.Values[I] := TValueClass(Row.Table.Fields[I].GetValueClass).Create; 103 103 104 104 Node2 := Node.FirstChild; 105 105 I := 0; 106 106 while Assigned(Node2) and (Node2.NodeName = 'Value') and (I < Row.Values.Count) do begin 107 case Row. Parent.Fields[I].DataType.FieldType of107 case Row.Table.Fields[I].DataType.FieldType of 108 108 ftString: TValueString(Row.Values[I]).Value := string(Node2.TextContent); 109 109 ftInteger: TValueInteger(Row.Values[I]).Value := StrToInt(string(Node2.TextContent)); … … 125 125 NewNode := Node.OwnerDocument.CreateElement('Value'); 126 126 Node.AppendChild(NewNode); 127 case Row. Parent.Fields[I].DataType.FieldType of127 case Row.Table.Fields[I].DataType.FieldType of 128 128 ftString: NewNode.TextContent := UnicodeString(TValueString(Row.Values[I]).Value); 129 129 ftInteger: NewNode.TextContent := UnicodeString(IntToStr(TValueInteger(Row.Values[I]).Value)); … … 144 144 while Assigned(Node2) and (Node2.NodeName = 'Record') do begin 145 145 NewRecord := TRecord.Create; 146 NewRecord. Parent := Records.Parent;146 NewRecord.Table := Records.Table; 147 147 LoadNodeRecord(NewRecord, Node2); 148 148 Records.Add(NewRecord); … … 492 492 if Assigned(Field) then begin 493 493 FieldIndex := Table.Fields.IndexOf(Field); 494 TValue(Row.Values[FieldIndex]).SetString(InsertValues.ValueFromIndex[ValueIndex]);494 Row.Values[FieldIndex].SetString(InsertValues.ValueFromIndex[ValueIndex]); 495 495 end else raise Exception.Create(Format(SColumnNotFoundInTable, 496 496 [InsertValues.Names[ValueIndex], TableName]));
Note:
See TracChangeset
for help on using the changeset viewer.