ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/branches/journaling/runtime/nongui/IBDatabase.pas
(Generate patch)

Comparing ibx/trunk/runtime/nongui/IBDatabase.pas (file contents):
Revision 209 by tony, Wed Mar 14 12:48:51 2018 UTC vs.
Revision 229 by tony, Tue Apr 10 13:32:36 2018 UTC

# Line 207 | Line 207 | type
207      FDataSets: TList;
208      FLoginCalled: boolean;
209      FUseDefaultSystemCodePage: boolean;
210 +    FUseHiddenPassword: boolean;
211      procedure EnsureInactive;
212      function GetAuthenticationMethod: string;
213      function GetDBSQLDialect: Integer;
# Line 268 | Line 269 | type
269      function AddTransaction(TR: TIBTransaction): Integer;
270      function FindTransaction(TR: TIBTransaction): Integer;
271      function FindDefaultTransaction(): TIBTransaction;
272 +    procedure ReConnect;
273      procedure RemoveTransaction(Idx: Integer);
274      procedure RemoveTransactions;
275  
# Line 695 | Line 697 | begin
697    end;
698   end;
699  
700 + procedure TIBDataBase.ReConnect;
701 + var OldLoginPrompt: boolean;
702 +    OldPassword: string;
703 + begin
704 +  CheckActive;
705 +  if FHiddenPassword <> '' then
706 +  begin
707 +    OldLoginPrompt := LoginPrompt;
708 +    OldPassword := FHiddenPassword;
709 +    LoginPrompt := false;
710 +    FUseHiddenPassword := true;
711 +    try
712 +      Connected := false;
713 +      FHiddenPassword := OldPassword;
714 +      Connected := true;
715 +    finally
716 +      LoginPrompt := OldLoginPrompt;
717 +      FUseHiddenPassword := false;
718 +    end;
719 +  end
720 +  else
721 +  begin
722 +    Connected := false;
723 +    Connected := true;
724 +  end;
725 + end;
726 +
727   procedure TIBDataBase.ForceClose;
728   begin
729    if Connected then
# Line 801 | Line 830 | begin
830      FAttachment.DropDatabase;
831    end;
832    FAttachment := nil;
833 +  FHiddenPassword := '';
834    FCloseAction := caNormal;
835  
836    if not (csDesigning in ComponentState) then
# Line 1017 | Line 1047 | begin
1047    FCloseAction := caNormal;
1048    CheckInactive;
1049    CheckDatabaseName;
1050 <  if (not LoginPrompt) and (FHiddenPassword <> '') then
1050 >  if (not LoginPrompt) and (FHiddenPassword <> '') and not FUseHiddenPassword then
1051    begin
1052      FHiddenPassword := '';
1053      FDBParamsChanged := True;
# Line 1054 | Line 1084 | begin
1084       if (DPB = nil) or FDBParamsChanged or (TempDBParams.Text <> FDBParams.Text) then
1085       begin
1086         FDBParamsChanged := False;
1087 <       if (not LoginPrompt and not (csDesigning in ComponentState)) or (FHiddenPassword = '') then
1087 >       if not FUseHiddenPassword and (not LoginPrompt and not (csDesigning in ComponentState)) or (FHiddenPassword = '') then
1088           DPB := GenerateDPB(TempDBParams)
1089         else
1090         begin

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines