Ignore:
Timestamp:
Mar 8, 2012, 3:11:10 PM (13 years ago)
Author:
chronos
Message:
  • Modified: Direct acces using Database: TSqlDatabase replaced by TChronisClient interface.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UMainForm.pas

    r36 r37  
    148148procedure TMainForm.UpdateInterface;
    149149begin
    150   ADisconnect.Enabled := Core.System.Database.Connected;
    151   AConnect.Enabled := not Core.System.Database.Connected;
    152   AImportStructure.Enabled := Core.System.Database.Connected;
     150  ADisconnect.Enabled := Core.System.Client.Connected;
     151  AConnect.Enabled := not Core.System.Client.Connected;
     152  AImportStructure.Enabled := Core.System.Client.Connected;
    153153  if Assigned(MainPanelForm) then
    154154    Caption := MainPanelForm.Caption + ' - ' + ApplicationInfo.Name
     
    257257  if LoginForm.ShowModal = mrOK then begin
    258258    with TConnectProfile(Core.Profiles[Core.LastProfile]) do begin
    259       Core.System.Database.HostName := HostName;
    260       Core.System.Database.Database := Database;
    261       Core.System.Database.UserName := Core.LastUserName;
    262       Core.System.Database.Password := Core.LastPassword;
    263       Core.System.Database.Port := Port;
     259      Core.System.Client.Host := HostName;
     260      Core.System.Client.Schema := Database;
     261      Core.System.Client.User := Core.LastUserName;
     262      Core.System.Client.Password := Core.LastPassword;
     263      Core.System.Client.Port := Port;
    264264      if Protocol = cpDirect then Core.Client := TChronisClientDirect.Create;
    265265    end;
    266266    try
    267       Core.System.Database.Connect;
     267      Core.System.Client.Connect;
    268268      if Core.System.IsDatabaseEmpty then Core.System.ModuleSystem.Install;
    269269      Core.System.LoadTypes;
     
    277277procedure TMainForm.ADisconnectExecute(Sender: TObject);
    278278begin
    279   if Core.System.Database.Connected then begin
    280     Core.System.Database.Disconnect;
     279  if Core.System.Client.Connected then begin
     280    Core.System.Client.Disconnect;
    281281    TreeView1.Items.Clear;
    282282    Core.System.Types.Clear;
     
    361361      Groups.Client := Core.System.Client;
    362362      Groups.ObjectName := ObjectGroupTable;
    363       Groups.SchemaName := Core.System.Database.Database;
     363      Groups.SchemaName := Core.System.Client.Schema;
    364364      Groups.Load;
    365365      for I := 0 to Groups.Objects.Count - 1 do begin
     
    373373          Objects.Client := Core.System.Client;
    374374          Objects.ObjectName := ObjectTable;
    375           Objects.SchemaName := Core.System.Database.Database;
    376           Objects.SetCondition('Group', Obj.Properties.Values['Id']);
     375          Objects.SchemaName := Core.System.Client.Schema;
     376          Objects.Condition := '`Group`="' + Obj.Properties.Values['Id'] + '"';
    377377          Objects.Load;
    378378          for O := 0 to Objects.Objects.Count - 1 do begin
Note: See TracChangeset for help on using the changeset viewer.