Ver Mensaje Individual
  #5  
Antiguo 08-06-2005
Avatar de Spynosa
Spynosa Spynosa is offline
Miembro
 
Registrado: nov 2004
Ubicación: Ecija - Sevilla
Posts: 99
Reputación: 20
Spynosa Va por buen camino
hola, si estas usando los ibx puedes usar un componente IBBackupService y hacer lo siguiente:


with IBBackupService1 do
begin
ServerName :='localhost';
LoginPrompt := False;
Params.Add('user_name=sysdba');
Params.Add('password=masterkey');
Active := True;
try
Verbose := True;
Options := [NonTransportable, IgnoreLimbo];
DatabaseName := edit1.Text;
BackupFile.Add(edit2.Text);
ServiceStart;
While not Eof do
Memo1.Lines.Add(GetNextLine);
finally
Active := False;
end;
end;

y para restaurarlo usa IBRestoreService:

with IBRestoreService1 do
begin
ServerName := 'Poulet';
LoginPrompt := False;
Params.Add('user_name=sysdba');
Params.Add('password=masterkey');
Active := True;
try
Verbose := True;
Options := [Replace, UseAllSpace];
PageBuffers := 3000;
PageSize := 4096;
DatabaseName.Add(edit1.Text);
BackupFile.Add(edit2.Text);
ServiceStart;
While not Eof do
Memo1.Lines.Add(GetNextLine);
finally
Active := False;
end;
end;
Responder Con Cita