diff --git a/Source/Servidor/Configuracion/uConexionBD.pas b/Source/Servidor/Configuracion/uConexionBD.pas index 825734a1..31fa78af 100644 --- a/Source/Servidor/Configuracion/uConexionBD.pas +++ b/Source/Servidor/Configuracion/uConexionBD.pas @@ -85,6 +85,9 @@ begin edtPath.Text := dmServer.FDBPath; edtUser.Text := dmServer.FDBUser; edtPassword.Text := Decrypt(dmServer.FDBPass); + if OpenDialog.InitialDir = '' then + OpenDialog.InitialDir := ExtractFilePath(Application.ExeName); + end; procedure TfrConexionBD.Finalize; diff --git a/Source/Servidor/uDataModuleServer.pas b/Source/Servidor/uDataModuleServer.pas index 21de8c69..6cc6ccae 100644 --- a/Source/Servidor/uDataModuleServer.pas +++ b/Source/Servidor/uDataModuleServer.pas @@ -258,7 +258,8 @@ end; procedure TdmServer.DetenerLog; begin - FEscribirLog.Free; + DriverManager.OnTraceEvent := NIL; + FreeAndNIL(FEscribirLog); end; procedure TdmServer.DriverManagerTraceEvent(Sender: TObject; const Text: string; @@ -269,11 +270,14 @@ end; procedure TdmServer.EscribirLog(const AMensaje: String); begin - FEscribirLog.Enter; - try - JvLogFile1.Add(AMensaje); - finally - FEscribirLog.Leave; + if Assigned(FEscribirLog) then + begin + FEscribirLog.Enter; + try + JvLogFile1.Add(AMensaje); + finally + FEscribirLog.Leave; + end; end; end; diff --git a/Source/Servidor/uServerMainForm.pas b/Source/Servidor/uServerMainForm.pas index 5fef0451..473a7612 100644 --- a/Source/Servidor/uServerMainForm.pas +++ b/Source/Servidor/uServerMainForm.pas @@ -56,7 +56,7 @@ uses procedure TfServerForm.actCerrarExecute(Sender: TObject); begin - Application.Terminate; + Application.MainForm.Close; end; procedure TfServerForm.actRestartExecute(Sender: TObject);