Ver Mensaje Individual
  #2  
Antiguo 07-09-2007
Avatar de Delphius
[Delphius] Delphius is offline
Miembro Premium
 
Registrado: jul 2004
Ubicación: Salta, Argentina
Posts: 5.582
Reputación: 25
Delphius Va camino a la fama
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; // <- esto va aquí
                end;
           end; // <- te faltó un end para cerrar el THEN

Ha.. por cierto.. utiliza la etiquetas DELPHI y no las CODE.
Saludos,
__________________
Delphius
[Guia de estilo][Buscar]
Responder Con Cita