Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Bases de datos > Firebird e Interbase
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

 
 
Herramientas Buscar en Tema Desplegado
  #5  
Antiguo 30-11-2012
David Jiménez David Jiménez is offline
Miembro
 
Registrado: ene 2006
Ubicación: Córdoba, España
Posts: 91
Poder: 21
David Jiménez Va por buen camino
Quiero decir que al usar la función
Código Delphi [-]
function EjecutarPrograma(Programa:String;Esperar:Boolean=True):Boolean;
var ProcInfo:TProcessInformation;
    Info:TStartupInfo;
begin
  FillChar(Info,SizeOF(Info),0);
  Info.cb:=SizeOf(Info);
  Info.dwFlags:=STARTF_USESHOWWINDOW;
  Info.wShowWindow:=SW_HIDE;
  Result:=CreateProcess(nil,PChar(Programa),nil,nil,False,0,nil,nil,Info,ProcInfo);
  if Esperar then
    while WaitForSingleObject(ProcInfo.hProcess,100)=Wait_TimeOut do
    begin
      Application.ProcessMessages;
      if Application.Terminated then Break;
    end;
end;

En la parte final,

Código Delphi [-]
 if Esperar then
    while WaitForSingleObject(ProcInfo.hProcess,100)=Wait_TimeOut do
    begin
      Application.ProcessMessages;
      if Application.Terminated then Break;
    end;

Al entrar al While no espera a que termine el Restore. Lo digo porque al hacerlo con el .bat, el restore tarda unos segundos, y con el While acaba de forma inmediata

Un saludo
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
backup y restore santi33a PostgreSQL 2 16-05-2012 20:25:28
Backup y Restore de BD en SQL Server con C# Lester .NET 2 07-02-2009 13:49:32
Backup/Restore HectorMendez SQL 1 18-09-2007 09:25:09
Backup y restore chipsoni SQL 2 08-05-2006 10:20:56
Back Restore o Backup cmgenny Varios 1 04-05-2003 12:19:23


La franja horaria es GMT +2. Ahora son las 15:00:39.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi