CSV To SQLite

lawboy

Member
Licensed User
Longtime User
What is the process of reading a text/CSV file(with headers) into an array and writing it into an SQLite table in b4a?

Thanks
 
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
You should use StringUtils.LoadCSV.
Then you will have a list with the database rows.

Now you need to insert all these rows to the database.
Tip, wrapping all the inserts in one transaction (see SQL.BeginTransaction) will significantly improve the performance.

The table example reads a CSV file and adds it to a custom view: Creating a table view based on ScrollView
 
Upvote 0
Top