Ver Mensaje Individual
  #4  
Antiguo 24-09-2022
Avatar de pgranados
pgranados pgranados is offline
Miembro
 
Registrado: sep 2022
Ubicación: México
Posts: 264
Reputación: 2
pgranados Va por buen camino
Cita:
Empezado por pgranados Ver Mensaje
Buen día amigos, tengo duda con lo siguiente, necesito que al dar clic en un botón seleccione la base de datos que está en la ruta del ejecutable y que el parámetro Protocolo sea el contenido de un .TXT


Mi boton de "conectar (por asi decirlo)" es:

Código Delphi [-]
procedure TForm1.ConectarClick(Sender: TObject);
begin
  Unit2.DMPrincipal.FDConnection1.Params.Values['Database'] := ExtractFilePath(Application.ExeName)+'Test.FDB';
  FDQuery1.Open;
end;

Mi codigo para guardar la información que deberia de ir "Protocol" es:

Código Delphi [-]
procedure TForm3.CERRARClick(Sender: TObject);
var
  SList : TStringList;
begin
  SList := TStringList.Create;
  try
    if NombreServer.Text <> '' then
    begin
      SList.Add(NombreServer.Text);
      SList.SaveToFile(ExtractFilePath(Application.ExeName)+'PARAMETROS.TXT');
      ShowMessage('UBICACIÓN DE SERVIDOR GUARDADO');
      Form3.Close;
    end
    else
    begin
      ShowMessage('INGRESE UNA DIRECCIÓN POR FAVOR');
      Exit;
    end;
  finally
    SList.Free;
    SList := nil;

  end;

end;


¿Alguien podrá ayudarme? Saludos.

ERROR MIO, NO ES CAMPO PROTOCOL, ES CAMPO SERVER
Responder Con Cita