tDbComboBox, tDbListBox empty

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
777Yves
Posts: 37
Joined: Mon 09 Aug 2010 19:55
Location: Québec

tDbComboBox, tDbListBox empty

Post by 777Yves » Wed 02 Mar 2011 17:38

Hi, I think that I am loosing my mind.

On a simple form I put one
- MyConnection and set it up and active = true
- MyTable set it up and active = true
- MyDataSource set it up
- tDbEdit set up to MyDatasource then select field Gestions
- tDbListBox set up to MyDatasource then select field Gestions
- tDbComboBox set up to MyDatasource then select field Gestions
- tDbGrid set up to MyDatasource

In the VCL
- tDbEdit field Gestions = Gest2011
- tDbListBox no display at all
- tDbComboBox field Gestions = Gest2011
- tDbGrid all fields and data is there

Run this very small application
- tDbEdit field Gestions = Gest2011
- tDbListBox no display at all
- tDbComboBox field Gestions = Gest2011 but the dropdown is empty
- tDbGrid all fields and data is there

I could move from record to record, every component is updated except the tDblistBox is allways empty.
For the tDbComboBox the dropdown is still empty

There is some bad day... :idea:

Justmade
Posts: 108
Joined: Sat 16 Aug 2008 03:51

Post by Justmade » Thu 03 Mar 2011 07:55

Everything you mentioned is working perfectly properly.

The DBCombobox and DBListBox always work like this from Delphi 1 up and is not specific to MyDAC..

You have to provide a List on the Component's Items property for the user to select from to make them useful.

Maybe the Devart teams might give your more assistant.

AndreyZ

Post by AndreyZ » Thu 03 Mar 2011 12:14

Hello,

Such behaviour of TDBComboBox and TDBListBox components is a designed behaviour of all Delphi versions, and it isn't connected with MyDAC. These components allow users to change the field value of the current record to one of a fixed set of choices. It means that you should add the values to the Items property of both components to have a choice of values.

777Yves
Posts: 37
Joined: Mon 09 Aug 2010 19:55
Location: Québec

TDBComboBox and TDBListBox

Post by 777Yves » Thu 03 Mar 2011 12:56

Hi, you are both rigth.
This was just a bad day, a day where you should stay bed. :shock:

Thanks and if you could, delete this topic.

Post Reply