PAGUE 6 MESES
LEVE 12 MESES
GARANTIR DESCONTO

Fórum Percorer ADOQuery.RecordSet ERRO. #456161

22/09/2013

0

Estou tentando varrer um ADOQuery para inserir os resultados numa lista, porém ao chegar no último registro exibe um erro.

---------------------------
Debugger Exception Notification
---------------------------
Project DC2.exe raised exception class EOleException with message 'Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record'.
---------------------------
Break Continue Help
---------------------------

vT : string;

for I := 0 to ADOQuery1.RecordCount - 1 do begin
ADOQuery1.Recordset.Move(I,EmptyParam);
{varro todas as combos}
vT := VarToStr(ADOQuery1.Recordset.Fields['Nome'].Value);
vCombo.Items.Add(vT);
end;

O record count exibe o total correto, mas ao tentar ler o último registro gera um erro.

Obrigado.




Aesmo

Aesmo

Responder

Posts

22/09/2013

Aesmo

Ahhh, também tentei com Eof.

while not ADOQuery1.Eof do begin

Acontecia o mesmo erro.
Responder

Gostei + 0

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

Aceitar