1. B4XTable is a cross platform library. Your code will only work in B4A.
I forgot about that, but i think it could modify to work for all platform
4. The original code is asynchronous. Why make it synchronous? It will cause the UI to freeze.
There are situations that users needs to see whole data before making actions.
5. You are not checking the columns types. You will lose information if you treat all values as strings.
Table's need columns type, for formatting, alignment, etc, but developers (at least for me), don't need it. Return value as a string from a column is enough, It can be converted to desired type if needed.
6. There is a hidden assumption here that the column order in the SQL table is the same as the order of columns added to B4XTable.
That's true, SQL table should supply the correct order to B4XTable, for ex
select field1, field2 from table
or
select field2, field1 from table
I will post a small example that shows how to read data from a SQL table and add it to a B4XTable.
I read your example, it is good to have another option, but my application usually contains about 20-30 tables.
Using your example, I have to write a lines of codes to converts sql result into a list for every table.
I think, i prefer my solution, only 1 line code needed for every table, I am a lazy writter