Evitar errores al cerrar la aplicación servidor (no se cierra) y al elegir una base de datos.

git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@1088 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
David Arranz 2014-01-24 11:51:19 +00:00
parent 0b46cdef0f
commit e7f72e71ac
3 changed files with 14 additions and 7 deletions

View File

@ -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;

View File

@ -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;

View File

@ -56,7 +56,7 @@ uses
procedure TfServerForm.actCerrarExecute(Sender: TObject);
begin
Application.Terminate;
Application.MainForm.Close;
end;
procedure TfServerForm.actRestartExecute(Sender: TObject);