Changeset 15 for trunk/DbEngines
- Timestamp:
- Mar 22, 2018, 8:31:19 PM (7 years ago)
- Location:
- trunk/DbEngines
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DbEngines/UEngineMySQL.pas
r14 r15 69 69 var 70 70 DbRows: TDbRows; 71 DbRows2: TDbRows;72 71 NewTable: TTable; 73 72 I: Integer; -
trunk/DbEngines/UEngineXML.pas
r13 r15 77 77 while Assigned(Node2) and (Node2.NodeName = 'Value') and (I < Row.Values.Count) do begin 78 78 case TField(Row.Parent.Fields[I]).DataType.FieldType of 79 ftString: TValueString(Row.Values[I]).Value := Node2.TextContent;80 ftInteger: TValueInteger(Row.Values[I]).Value := StrToInt( Node2.TextContent);79 ftString: TValueString(Row.Values[I]).Value := string(Node2.TextContent); 80 ftInteger: TValueInteger(Row.Values[I]).Value := StrToInt(string(Node2.TextContent)); 81 81 ftDateTime: if Node2.TextContent <> '' then 82 TValueDateTime(Row.Values[I]).Value := XMLTimeToDateTime( Node2.TextContent);83 ftBoolean: TValueBoolean(Row.Values[I]).Value := StrToBool( Node2.TextContent);82 TValueDateTime(Row.Values[I]).Value := XMLTimeToDateTime(string(Node2.TextContent)); 83 ftBoolean: TValueBoolean(Row.Values[I]).Value := StrToBool(string(Node2.TextContent)); 84 84 end; 85 85 Node2 := Node2.NextSibling; … … 97 97 Node.AppendChild(NewNode); 98 98 case TField(Row.Parent.Fields[I]).DataType.FieldType of 99 ftString: NewNode.TextContent := TValueString(Row.Values[I]).Value;100 ftInteger: NewNode.TextContent := IntToStr(TValueInteger(Row.Values[I]).Value);101 ftDateTime: NewNode.TextContent := DateTimeToXMLTime(TValueDateTime(Row.Values[I]).Value);102 ftBoolean: NewNode.TextContent := BoolToStr(TValueBoolean(Row.Values[I]).Value);103 ftFloat: NewNode.TextContent := FloatToStr(TValueFloat(Row.Values[I]).Value);99 ftString: NewNode.TextContent := UnicodeString(TValueString(Row.Values[I]).Value); 100 ftInteger: NewNode.TextContent := UnicodeString(IntToStr(TValueInteger(Row.Values[I]).Value)); 101 ftDateTime: NewNode.TextContent := UnicodeString(DateTimeToXMLTime(TValueDateTime(Row.Values[I]).Value)); 102 ftBoolean: NewNode.TextContent := UnicodeString(BoolToStr(TValueBoolean(Row.Values[I]).Value)); 103 ftFloat: NewNode.TextContent := UnicodeString(FloatToStr(TValueFloat(Row.Values[I]).Value)); 104 104 end; 105 105 end; … … 244 244 NewNode: TDOMNode; 245 245 begin 246 ReadXMLFile(Doc, UTF8Decode(FileName));246 ReadXMLFile(Doc, FileName); 247 247 with Doc do try 248 248 if Doc.DocumentElement.NodeName <> 'MyData' then … … 275 275 SaveNodeTables(Database.Tables, NewNode); 276 276 end; 277 ForceDirectories UTF8(ExtractFileDir(FileName));278 WriteXMLFile(Doc, UTF8Decode(FileName));277 ForceDirectories(ExtractFileDir(FileName)); 278 WriteXMLFile(Doc, FileName); 279 279 finally 280 280 Doc.Free;
Note:
See TracChangeset
for help on using the changeset viewer.