Hola Victor Vega. ¿Podrías darnos a conocer el error y señalarnos en que parte ocurre?
Viendo rápidamente tu código te puedo decir que el error que veo es que estás haciendo el Next fuera del bucle. Tu código debería ir así:
Código Delphi
[-]QLlenar.SQL.Clear;
QLlenar.SQL.Add('select * from Datos order by cedula');
QLlenar.ExecSQL;
if QLlenar.RecordCount >=1
then begin
lista.Clear;
QLlenar.First;
while not QLLenar.Eof do
begin
ListItem:=lista.Items.Add;
ListItem.Caption:= FieldByName('nombres').AsString;
QLlenar.Next; end;
end;
Ha.. por cierto.. utiliza la etiquetas DELPHI y no las CODE.
Saludos,