lawboy Member Licensed User Longtime User Jan 21, 2011 #1 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: Jan 21, 2011
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
Erel B4X founder Staff member Licensed User Longtime User Jan 21, 2011 #2 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
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