Fórum duvida sql combobox #294290
02/09/2005
0
BOLA
CAMISA
TOALHA
gostaria de colocar todos esses itens (via sql) dentro do combobox, como faço isso?
um abraço
nelson
Njuniorba
Curtir tópico
+ 0Posts
02/09/2005
Steve_narancic
ou
combobox.items.clear; query.first; while not Query.eof do begin combobox.items.add(query.fieldbyname(´CAMPO´).asstring); query.next; end;
Gostei + 0
02/09/2005
Njuniorba
ou
combobox.items.clear; query.first; while not Query.eof do begin combobox.items.add(query.fieldbyname(´CAMPO´).asstring); query.next; end;
eu ja tinha este codigo.. porem quando uso 2 tabelas e dois combos da pau.. n mostra todos os registros:
combobox1.items.clear; combobox2.items.clear; query1.first; query2 while (not Query1.eof) and (not Query2.Eof) do begin combobox1.items.add(query1.fieldbyname(´CAMPO´).asstring); combobox2.items.add(query2.fieldbyname(´CAMPO´).asstring); query1.next; query2.next;
Gostei + 0
02/09/2005
Steve_narancic
Gostei + 0
02/09/2005
Steve_narancic
tipo
combobox.items.clear;
query1.first;
while not Query1.eof do
begin
combobox.items.add(query1.fieldbyname(´CAMPO´).asstring);
query1.next;
end;
query2.first;
while not Query2.eof do
begin
combobox.items.add(query2.fieldbyname(´CAMPO´).asstring);
query2.next;
end;
Gostei + 0
02/09/2005
Njuniorba
tipo
combobox.items.clear;
query1.first;
while not Query1.eof do
begin
combobox.items.add(query1.fieldbyname(´CAMPO´).asstring);
query1.next;
end;
query2.first;
while not Query2.eof do
begin
combobox.items.add(query2.fieldbyname(´CAMPO´).asstring);
query2.next;
end;
so acha de 1 tabela