Re: Populating a combo from a database table faster
- From: "Adem" <adembaba@xxxxxxxxxx>
- Date: 30 Mar 2006 00:33:24 -0700
This one would be better.
Combo.items.BeginUpdate;
CodeQuery.DisableControls;
try
Combo.items.clear;
CodeQuery.First; // ADO dataset
while not CodeQuery.Eof do begin
Combo.Items.Add(CodeQuery.Fields[0].AsString);
CodeQuery.Next;
end;
finally
Combo.items.EndUpdate;
CodeQuery.EnableControls;
end;
And, if you have any controls bound to CodeQuery, you might
want to bookmark the current location and return to it
before CodeQuery.EnableControls is issued. Left as a
further excercise.
.
- References:
- Populating a combo from a database table faster
- From: tglunz
- Re: Populating a combo from a database table faster
- From: Adem
- Populating a combo from a database table faster
- Prev by Date: Re: Populating a combo from a database table faster
- Next by Date: Re: HTML parser component help
- Previous by thread: Re: Populating a combo from a database table faster
- Next by thread: Re: Populating a combo from a database table faster
- Index(es):