Page 1 of 1

Can´t make a DBLookupComboBox retrieve data

Posted: Mon 30 Oct 2006 23:52
by aromanov
Hi . I´m relly new using C++ Builder and MYDAC for accessing a MySQL Database and have a problem :

When I add a DBLookupComboBox to my form, I select the DataSource and the DataField (wich are yet working with others DBEdits Objects in the same Form) and the ComboBox seems to never make a link with its data source : the DBLookupComboBox Field clears its name and shows no data (as if it is null), and if I run the project, this field shows no data. Neither can focus on it.

I suposse it has a simple solution. What is it ?

Thanks !!!

Re: Can´t make a DBLookupComboBox retrieve data

Posted: Tue 31 Oct 2006 00:45
by pleitch
This appears to be a C++ forum question not a MySQL question however, that is not for me to say.

I do not use C++ but, if I were using Delphi, I would set ListSource to your table of values you wish to look up, ListField to the field(s) you wish to display and KeyField to the field you wish to return the value of to DataField.

Hope this helps.

Posted: Tue 31 Oct 2006 10:15
by Antaeus
pleitch is right, this is not MyDAC issue. You can read details about usage of db-aware components in C++Builder Help.

Posted: Tue 31 Oct 2006 19:46
by aromanov
You're right Pleitch. This is not the correct Forum (my mistake). You've tried to help anyway. I appreciatte that.

Thanks a lot.