Odlarhg 0 Posted December 20, 2019 Hi, I need to populate a DBLookupComboBox with data from an SQL Server table. I don't have much experience with Delphi and although I created the DBLookupComboBox I can't populate it. This is what I have done at the moment. Create a TADOConnection to the database that contains the table Create a TADOQuery Create a TDataSource Then create the DBLookupComboBox In the properties of DBLookupComboBox I assigned the DataSource using the TDataSource that I créated I assigned the Id field in KeyField I assigned the Name field in ListField With the above I understand that it should work, but as I said I do not have much experience with Delphi and I do not know what else I should configure so that the DBLookupComboBox can be populated with the data in the table.Could you help me? Share this post Link to post
Ian Branch 128 Posted December 20, 2019 Hi Odlarhg, The component's Datasource/DataField are the main table. You need to assign the ListSource/ListField/KeyField to the Table you are looking up. The Key field should match the DataField. HTH Ian Share this post Link to post