[Lazarus] How to use DBCombobox

Mattias Gaertner nc-gaertnma at netcologne.de
Mon Jun 18 11:38:16 CEST 2012


On Mon, 18 Jun 2012 11:28:15 +0200
Koenraad Lelong <lazarus1 at de-brouwerij.be> wrote:

> On 17-06-12 19:15, Koenraad Lelong wrote:
> > Hi,
> >
> > I'm trying to use a DBCombobox, but I don't know how to show all
> > records. Only the first record shows.
> > What I did :
> > Put an IBConnection on the form. Fill in the details.
> > Put an SQLTransaction on the form.
> > Put an SQLQuery on the form and fill in the details about the table to use.
> > Put a Datasource on the form.
> > Put a DBCombobox on the form.
> > To test I put a DBGrid on the form.
> > When I activate the SQL, I see some records filling the grid and the
> > first record in the DBCombobox.
> > When I run the application, I can navigate to all records in the grid
> > and I see the first record in the DBCombobox. But the drop down of the
> > DBCombobox shows nothing so I can't select other records than the first.
> >
> > I'm using Lazarus 0.9.30.4 with FPC 2.6.0.
> >
> > What am I missing ?
> >
> 
> No suggestions what I'm doing wrong ?
> 
> I enclose a project, using the employee-database.

TDBComboBox is for your own list of values.
Maybe you are looking for TDBLookupComboBox?

Mattias




More information about the Lazarus mailing list