ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/examples/DBAdmin/DataModule.pas
(Generate patch)

Comparing ibx/trunk/examples/DBAdmin/DataModule.pas (file contents):
Revision 209 by tony, Wed Mar 14 12:48:51 2018 UTC vs.
Revision 212 by tony, Thu Mar 15 11:02:09 2018 UTC

# Line 153 | Line 153 | type
153      procedure IBXServicesConnection1Login(Service: TIBXServicesConnection;
154        var aServerName: string; LoginParams: TStrings);
155      procedure LegacyUserListAfterOpen(DataSet: TDataSet);
156 +    procedure LegacyUserListAfterPost(DataSet: TDataSet);
157      procedure LegacyUserListBeforeClose(DataSet: TDataSet);
158      procedure ShadowFilesCalcFields(DataSet: TDataSet);
159      procedure SubjectAccessRightsBeforeOpen(DataSet: TDataSet);
# Line 658 | Line 659 | procedure TDatabaseData.Connect;
659  
660    procedure KillShadows;
661    begin
662 <    with IBValidationService1 do
662 >    with IBXServicesConnection1 do
663      begin
664 <      Options := [IBXServices.KillShadows];
665 <      Execute(nil);
666 <      MessageDlg('All Unavailable Shadows killed',mtInformation,[mbOK],0);
664 >      ServerName := FServerName;
665 >      Protocol := FProtocol;
666 >      PortNo := FPortNo;
667 >      Connected := true;
668 >    end;
669 >    try
670 >      with IBValidationService1 do
671 >      begin
672 >        DatabaseName := FDatabasePathName;
673 >        Options := [IBXServices.KillShadows];
674 >        Execute(nil);
675 >        MessageDlg('All Unavailable Shadows killed',mtInformation,[mbOK],0);
676 >      end;
677 >    finally
678 >      IBXServicesConnection1.Connected := false;
679      end;
680    end;
681  
# Line 680 | Line 693 | begin
693        begin
694          if E.IBErrorCode = isc_io_error then
695          begin
683            FDBPassword := '';
696            if MessageDlg('I/O Error reported on database file. If this is a shadow file, do you want '+
697                          'to kill all unavailable shadow sets?. The original message is ' + E.Message,
698 <                        mtInformation,[mbYes,mbNo],0) = mrYes then
687 <            try KillShadows except end
688 <          else
698 >                        mtInformation,[mbYes,mbNo],0) = mrNo then
699              continue;
700 +          try KillShadows except end;
701 +          FDBPassword := '';
702          end
703          else
704            ReportException(E);
# Line 1234 | Line 1246 | begin
1246    RoleNameList.Active := true;
1247   end;
1248  
1249 + procedure TDatabaseData.LegacyUserListAfterPost(DataSet: TDataSet);
1250 + begin
1251 +  RoleNameList.Active := true;
1252 + end;
1253 +
1254   procedure TDatabaseData.LegacyUserListBeforeClose(DataSet: TDataSet);
1255   begin
1256    RoleNameList.Active := false;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines