How to store values from an SQL query into a ComboBox component?
问题 I have a problem with the TComboBox component in Borland C++Builder 6. In the ComboBox, I want to insert the result of an SQL query, eg: ID value --------- 1 one 2 two 3 three I want to display the values of the value column to the user, e.g. one , two , three , but reference the values of the ID column. Can anyone help me? Google did not say a lot about this to me. 回答1: apologize forgot to put in some code ComboBox1->AddItem("one", (TObject *) 1); ComboBox1->AddItem("two", (TObject *) 2);