title: Converting ConnectForm fields from ZeosLib to FireDAC
body: <p>Delphi 10.2.2</p>
  
  <p><strong>1.</strong> Is this correct way to convert this <a href="https://github.com/Faq/Truice/blob/master/MeConnectForm.pas#L156" rel="nofollow noreferrer">code part</a> for MySQL from ZeosLib to FireDAC?</p>
  
  <p>ZeosLib:</p>
  
  <pre><code>procedure TMeConnectForm.edExit(Sender: TObject);
  begin
    try
      MainForm.MyTrinityConnection.Password := edPassword.Text;
      MainForm.MyTrinityConnection.HostName := edServer.Text;
      MainForm.MyTrinityConnection.User := edUsername.Text;
      MainForm.MyTrinityConnection.Database := edmDatabase.Text;
      MainForm.MyTrinityConnection.Port := StrToIntDef(edPort.Text, 3306);
    except
      ActiveControl := Sender as TWinControl;
      raise;
    end;
  end;
  </code></pre>
  
  <p>FireDAC:</p>
  
  <pre><code>procedure TMeConnectForm.edExit(Sender: TObject);
  begin
    try
      MainForm.MyTrinityConnection.Open('Password := edPassword.Text');
      MainForm.MyTrinityConnection.Open('Server:= edServer.Text');
      MainForm.MyTrinityConnection.Open('User_Name:= edUsername.Text');
      MainForm.MyTrinityConnection.Open('Database:= edmDatabase.Text');
      MainForm.MyTrinityConnection.Open('Port:= StrToIntDef(edPort.Text, 3306)');
    except
      ActiveControl := Sender as TWinControl;
      raise;
    end;
  end;
  </code></pre>
  
  <p><strong>2.</strong> Should somewhere here insert also this?</p>
  
  <pre><code>MainForm.MyTrinityConnection.DriverName:='MYSQL';
  </code></pre>
  
  <p><br/>
  <br/>
  <br/>
  <strong>Final code after Victorias solution, looks so:</strong></p>
  
  <pre><code>procedure TMeConnectForm.edExit(Sender: TObject);
  begin
    try
      MainForm.MyTrinityConnection.DriverName:='MySQL';
      MainForm.MyTrinityConnection.Params.AddPair('Server', edServer.Text);
      MainForm.MyTrinityConnection.Params.AddPair('Port', edPort.Text);
      MainForm.MyTrinityConnection.Params.AddPair('Database', edmDatabase.Text);
      MainForm.MyTrinityConnection.Params.AddPair('User_Name', edUsername.Text);
      MainForm.MyTrinityConnection.Params.AddPair('Password', edPassword.Text);
    except
      ActiveControl := Sender as TWinControl;
      raise;
    end;
  end;
  </code></pre>