Ignore:
Timestamp:
Jan 20, 2015, 11:33:39 PM (10 years ago)
Author:
chronos
Message:
  • Fixed: XML database can be opened from file.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DbEngines/UEngineXML.pas

    r6 r7  
    1111  { TDatabaseXML }
    1212
    13   TDatabaseXML = class(TDatabase)
     13  TDatabaseXML = class(TDatabaseClient)
    1414  private
    1515    function GetFileName: string;
     
    4747function TDatabaseXML.GetFileName: string;
    4848begin
    49   if Copy(ConnectionString, 1, 8) = 'file:///' then
    50     Result := Copy(ConnectionString, 8, High(Integer))
     49  if Copy(Database.ConnectionString, 1, 8) = 'file:///' then
     50    Result := Copy(Database.ConnectionString, 8, High(Integer))
    5151    else Result := '';
    5252end;
     
    238238      NewNode := FindNode('Tables');
    239239      if Assigned(NewNode) then
    240         LoadNodeTables(Tables, NewNode);
     240        LoadNodeTables(Database.Tables, NewNode);
    241241    end;
    242242  finally
     
    259259      NewNode := OwnerDocument.CreateElement('Tables');
    260260      AppendChild(NewNode);
    261       SaveNodeTables(Tables, NewNode);
     261      SaveNodeTables(Database.Tables, NewNode);
    262262    end;
    263263    ForceDirectoriesUTF8(ExtractFileDir(FileName));
     
    270270procedure TDatabaseXML.Load;
    271271begin
    272   inherited Load;
    273272  if FileExists(FileName) then
    274273    LoadFromFile(FileName);
     
    277276procedure TDatabaseXML.Save;
    278277begin
    279   inherited Save;
    280278  SaveToFile(FileName);
    281279end;
Note: See TracChangeset for help on using the changeset viewer.