PAGUE 6 MESES
LEVE 12 MESES
GARANTIR DESCONTO

Fórum IBValidate Service - Como usar #419265

03/07/2012

0

Bom dia a todos,

Estou fazendo um mini sistema para backup, validação e restore do banco de dados.

Estou fazendo conforme codigo abaixo


procedure TfrmBackup.validacao;
var
  vVerificaStatus:String;
begin
    Screen.Cursor:= CrHourGlass;
    MemoDetalhes.Lines.Clear;
    with IBValidate do
       begin
           //Define o nome do servidor do banco de dados
           ServerName := EditCaminhoServer.Text;
           DatabaseName := EditCaminhoOrigem.Text;

           //Define o protocolo da rede
           case RadioGroupProtocolo.ItemIndex of
             0: Protocol := TCP;
             1: Protocol := Local;
           end;

           //Configura os parâmetros do Restore
           LoginPrompt := false;
           Params.Clear;
           Params.Values[user_name] := Editusuario.Text;
           Params.Values[password]  := editSenha.Text;

           Active := True;
           Application.ProcessMessages;
           //Configura as opções de Checagem
           Options :=[CheckDB,ValidateDB,MendDB];
           {if checkboxDB.Checked then
            Options := Options + [CheckDB];
           if checkLimboTransaction.Checked then
            Options := Options + [LimboTransactions];
           if checkIgnoreChecksumChecagem.Checked then
            Options := Options + [IgnoreChecksum];
           if CheckKillShadowns.Checked then
            Options := Options + [KillShadows];
           if CheckMendDB.Checked then
            Options := Options + [MendDB];
           if CheckSweepDB.Checked then
            Options := Options + [SweepDB];
           if CheckValidateDB.Checked then
            Options := Options + [ValidateDB];
           if CheckValidateFull.Checked then
            Options := Options + [ValidateFull];

           IBValidate.Options := Options;} 
           try
              try 
                //Inicia a operação
                 ServiceStart;
                 while IsServiceRunning do Sleep(10);
                 ShowMessage(A validação terminou);
                 //Verifica se a base esta com problemas e avisao ao usuario se estiver
                  vVerificaStatus := GetNextLine;
                 if vVerificaStatus = EmptyStr then
                   MemoDetalhes.Lines.Add(Atenção foi detectado um problema +#13 + com sua base de dados o sistema tentará repara, por favor aguarde);
                //Lista os processo no Memo
                 While not eof do
                   Application.ProcessMessages;
                   MemoDetalhes.Lines.Add(Trim(GetNextLine));
                 except
             on e : exception do
               begin
                   MemoDetalhes.Lines.Add(Erro:  + e.Message);
               end;
             end;
            finally
          Active := False;
          Screen.Cursor := CrDefault;
      end;
      end; 
  end;


O problema é que quando marco mais de uma opção ele nao realiza a operação quando chega no ServiceStart;

Segue Codigo de erro.
---------------------------
Debugger Exception Notification
---------------------------
Project backup.exe raised exception class EIBInterBaseError with message please retry, specifying an option. Process stopped. Use Step or Run to continue.
---------------------------
OK   Help   
---------------------------

Alguem pode me dar uma luz?
Willian Amor

Willian Amor

Responder

Utilizamos cookies para fornecer uma melhor experiência para nossos usuários, consulte nossa política de privacidade.

Aceitar