Subject Re: [IBO] Fill ComboBox with sql
Author Jason Wharton
Use something like this:

with TIB_Cursor.Create( Self ) do
try
IB_Connection := <aconnection>;
IB_Transaction := <atransaction>;
SQL.Text := 'SELECT .... FROM ... ORDER BY ...';
First;
while not EOF do
begin
MyItems.Add( Fields[0].AsString );
MyItemValues.Add( Fields[1].AsString );
Next;
end;
finally
Free;
end;

HTH,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com


----- Original Message -----
From: "MT" <m_tammaro@...>
To: <IBObjects@yahoogroups.com>
Sent: Wednesday, March 21, 2001 11:14 AM
Subject: [IBO] Fill ComboBox with sql


> I need to fill a lot of IBComboBox (Items and ItemsValues) dinamically
when
> start application, could anyone suggest a solution? I'm beginners with
sql.
> Thanks
>
> Mark
>
> P.S.
> Example:
> Table: general
> NAME=integer
> SURNAME=integer
>
> Table: combo description
> IDCOMBO=idcombo
> COD=integer
> DESCRIPTION=text
>
> I need for field NAME and SURNAME that the combo display a text
description
> but save a number code.
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>