I had seen the nearest question on https://www.b4x.com/android/forum/threads/load-csv-into-sqlite.9370/, but I want to create sql table from csv file, on which the first row of csv file is name of table columns (about 80 columns in my csv file).
This is example for csv file:
Please, tell me how to do this. Thanks.
Attached you find a small project to convert csv files to a SQLite database. The program: - detects automatically between the two separator characters ',' ';'. - determines, on request, the data type for each column (TEXT, REAL, INREGER), these can be changed. - the column names are the values...
Attached you find a small project to convert csv files to a SQLite database. The program: - detects automatically between the two separator characters ',' ';'. - determines, on request, the data type for each column (TEXT, REAL, INREGER), these can be changed. - the column names are the values...
You should certainly explore what they recommended to you. I attached a small example (perhaps with defects) that could help you in what you are looking for.
It is mostly compilation of code. Overcoat by B4XTable
The project by @Mariano Ismael Castro is excellent, but it might be advanced for someone learning the first steps of importing a csv file into a SQLite table. If you find it somewhat advanced for you at this stage, come back, I will post you a complete project that wil simplify all that using the csv file that Mariano is using in his project.
The project by @Mariano Ismael Castro is excellent, but it might be advanced for someone learning the first steps of importing a csv file into a SQLite table. If you find it somewhat advanced for you at this stage, come back, I will post you a complete project that wil simplify all that using the csv file that Mariano is using in his project.
I sent you as PM a complete simple project to import a CSV file into a SQLite table. If it satisfies you and find it easy to learn, let me know so I can post it to the rest of the emmbers who are interested.
1. I use StringUtils library to import the CSV text file into the SQLite table. There are other ways to import like, such as CSVParser class module, RegEx.Split and TextReader, although TextReader is no longer recommended by the community. 2. The text file in this project has a semi colon as...