207 |
|
FDataSets: TList; |
208 |
|
FLoginCalled: boolean; |
209 |
|
FUseDefaultSystemCodePage: boolean; |
210 |
+ |
FUseHiddenPassword: boolean; |
211 |
|
procedure EnsureInactive; |
212 |
|
function GetAuthenticationMethod: string; |
213 |
|
function GetDBSQLDialect: Integer; |
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 |
|
|
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 |
830 |
|
FAttachment.DropDatabase; |
831 |
|
end; |
832 |
|
FAttachment := nil; |
833 |
+ |
FHiddenPassword := ''; |
834 |
|
FCloseAction := caNormal; |
835 |
|
|
836 |
|
if not (csDesigning in ComponentState) then |
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; |
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 |