Requery fica em laço infinito

Delphi

15/08/2014

Olá pessoal gostaria de saber se alguém pode me ajudar ao executar o código abaixo quando chega no Requery o mesmo fica retornando na linha 12 como se estivesse no laço infinito.

procedure TFCadEmp.qUsu_WebBeforePost(DataSet: TDataSet); 
var newValue : string; 
    flag : Integer; 
begin 
  inherited; 
  flag := 0; 
  newValue := cLiberado; 
  if ( UpperCase(newValue) <> 'S' ) 
  and( UpperCase(newValue) <> 'N' ) then begin 
    qUsu_WebUSU_LIBERADO.AsString := 'N'; 
  end; 
  DMConexao.AdoQry.SQL.Clear; 
  DMConexao.AdoQry.Close; 
  DMConexao.AdoQry.SQL.Text := 'UPDATE USUARIOS_WEB SET USU_LIBERADO = '+UpperCase(QuotedStr(newValue))+' WHERE USU_ID = '+ qUsu_WebUSU_ID.AsString; 
  DMConexao.AdoQry.ExecSQL; 
  DMConexao.AdoQry.Close; 
  qUsu_Web.Parameters[0].Value := QCadastroEMPRES_ID.AsInteger; 
  qUsu_Web.Requery; 
  cLiberado :='' 


se eu tiro o requery da o seguinte erro:
Linha não pode ser localizada para a atualização. Alguns valores podem ter sido alterados desde que ela foi lida pela última vez".
Sidnei Junior

Sidnei Junior

Curtidas 0

Respostas

Sidnei Junior

Sidnei Junior

15/08/2014

ALGUÉM?
GOSTEI 0
POSTAR