If you want to add value to the Combo Box in Delphi then the point is you add some value in Combo Items ( see ComboBox properties in object inspector)
If You using query to access the database you can write the code like this:
with Query1 do
begin
Close;
SQL.Clear;
SQL.Add('select * from [table name]');
Open;
Query1.First;
while (not Query1.Eof) do
begin
ComboBox1.Items.Add(Query1.Fields[1].AsString);
Query1.Next;
end;
end;
have a nice try :)
i want to fill t combobox from database in LAZURAS using Mysql55comnnection and sql query.
ReplyDeletecan u provide me code for it.