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

Comparing ibx/trunk/runtime/ibxscript.pas (file contents):
Revision 80 by tony, Mon Jan 1 11:31:07 2018 UTC vs.
Revision 109 by tony, Thu Jan 18 14:37:48 2018 UTC

# Line 566 | Line 566 | begin
566   end;
567  
568   procedure TCustomIBXScript.DoReconnect;
569 + var LoginPrompt: boolean;
570   begin
571    with GetTransaction do
572      if InTransaction then Commit;
573 +  LoginPrompt := Database.LoginPrompt;
574 +  Database.LoginPrompt := false;
575    Database.Connected := false;
576    Database.Connected := true;
577 +  Database.LoginPrompt := LoginPrompt;
578    GetTransaction.Active := true;
579   end;
580  
# Line 652 | Line 656 | end;
656  
657   procedure TCustomIBXScript.SetDatabase(AValue: TIBDatabase);
658   begin
659 < if FDatabase = AValue then Exit;
659 > if not (csLoading in ComponentState) and (FDatabase = AValue) then Exit;
660   FDatabase := AValue;
661   FISQL.Database := AValue;
662   FIBXMLProcessor.Database := AValue;
# Line 849 | Line 853 | var  RegexObj: TRegExpr;
853       param: string;
854       Terminator: char;
855       FileName: string;
856 +     DBConnected: boolean;
857 +     LoginPrompt: boolean;
858   begin
859    Result := false;
860    ucStmt := AnsiUpperCase(stmt);
# Line 966 | Line 972 | begin
972        begin
973          if Database.Attachment.CharSetName2CharSetID(param,charsetid) then
974          begin
975 +          DBConnected := Database.Connected;
976 +          LoginPrompt := Database.LoginPrompt;
977 +          Database.LoginPrompt := false;
978 +          Database.Connected := false;
979            Database.Params.Values['lc_ctype'] := param;
980 <          if Database.Connected then
981 <            DoReconnect;
980 >          Database.Connected := DBConnected;
981 >          Database.LoginPrompt := LoginPrompt;
982          end
983          else
984            raise Exception.CreateFmt(sInvalidCharacterSet, [param,stmt]);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines