the_watchmann
Member
Hi. I'm new to B4X. Been tinkering with B4A especially as Android programming is new to me and B4A/B4X offers a more familiar touch.
Anyway, I have been trying to figure out how to add items to a combobox and haven't been able to find anything that works on the forums. I found a thread from 2013 but i guess things have changed a lot since then. Specifically, I want to load a supplier list from a sqlite3 database into a combobox (b4j & b4a). What I want to do is something like this:
Private sql As String ' set up a string to place the query into
Private Result As ResultSet
'
sql = "SELECT SUPPLIERNAME FROM SUPPLIER ORDER BY SUPPLIERNAME;" ' the actual query
Result = SQL1.ExecQuery(sql) ' this is where things go bad for me. I cannot figure out how to load items/name lists into the combobox.
For Each Result ' No, this is not actual b4x code. Just putting my way of thinking on 'paper' . a Starting point...
cboSupplier.SetItems (Result.GetString)
Next
I do apologise if there is an actual reply on the forums somewhere. After 2 days I haven't found anything that works
Thanks and regards
David
Anyway, I have been trying to figure out how to add items to a combobox and haven't been able to find anything that works on the forums. I found a thread from 2013 but i guess things have changed a lot since then. Specifically, I want to load a supplier list from a sqlite3 database into a combobox (b4j & b4a). What I want to do is something like this:
Private sql As String ' set up a string to place the query into
Private Result As ResultSet
'
sql = "SELECT SUPPLIERNAME FROM SUPPLIER ORDER BY SUPPLIERNAME;" ' the actual query
Result = SQL1.ExecQuery(sql) ' this is where things go bad for me. I cannot figure out how to load items/name lists into the combobox.
For Each Result ' No, this is not actual b4x code. Just putting my way of thinking on 'paper' . a Starting point...
cboSupplier.SetItems (Result.GetString)
Next
I do apologise if there is an actual reply on the forums somewhere. After 2 days I haven't found anything that works
Thanks and regards
David