Cita:
Empezado por Nbull
...Pero, ahora como quito los registros que estan vacios, Neftalí me dijo que con la propiedad Isnull del Field pero como llamo a esa propiedad.
|
Algo así debería funcionar.
Código Delphi
[-]
procedure TForm7.FormCreate(Sender: TObject);
begin
AdoQuery1.SQL.Add('SELECT distinct Poblacion FROM agenda');
AdoQuery1.Active:=true;
WHILE not AdoQuery1.EOF do
begin
if not (AdoQuery1,Fields.FieldByName('Poblacion').IsNull) then begin
ListBox1.Items.Add(AdoQuery1,Fields.FieldByName('Poblacion').AsString);
end;
AdoQuery1.NEXT;
end;
end;