Ignore:
Timestamp:
Feb 16, 2015, 11:37:47 PM (10 years ago)
Author:
chronos
Message:
  • Added: Connection to MySQL host and loading list of available tables.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DbEngines/UEngineXML.pas

    r8 r12  
    66
    77uses
    8   Classes, SysUtils, DOM, XMLRead, XMLWrite, UDatabase, UXMLUtils, FileUtil;
     8  Classes, SysUtils, DOM, XMLRead, XMLWrite, UDatabase, UXMLUtils, FileUtil,
     9  UHtmlClasses;
    910
    1011type
     
    4647
    4748function TDatabaseXML.GetFileName: string;
    48 begin
    49   if Copy(Database.ConnectionString, 1, 8) = 'file:///' then
    50     Result := Copy(Database.ConnectionString, 8, High(Integer))
    51     else Result := '';
     49var
     50  URL: TURL;
     51begin
     52  URL := TURL.Create;
     53  try
     54    URL.AsString := Database.ConnectionString;
     55    if URL.Scheme <> 'file' then
     56      raise Exception.Create('Wrong connection string. Required file scheme.');
     57
     58    Result := URL.Path
     59  finally
     60    URL.Free;
     61  end;
    5262end;
    5363
Note: See TracChangeset for help on using the changeset viewer.