Android Question .CSV file to .DB file

trepdas

Active Member
Licensed User
Hello everybody.

I have a csv file to create an expanding list.

I decided to work with sqllite instead or readying plain text.

How do I convert a csv file to a .db file with Dbutils ?

ThXXX
 

trepdas

Active Member
Licensed User
Klaus,

When running the code for the first time (with first time ever b4j interface) I get error : module not found ; javafx.swing


B4J Version: 8.50
Java Version: 12
Parsing code. (0.00s)
Building folders structure. (0.02s)
Compiling code. (0.01s)
Compiling layouts code. (0.00s)
Organizing libraries. (0.00s)
Compiling generated Java code. Error
error: module not found: javafx.swing
1 error

javac 12.0.1
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
I guess this was my Que to move on from B4a to B4J.
You can do it all within B4A:
1. Create the database and table with its structure and the table indices if needed.
2. Using StringUtilities, Load your csv file into a list using either su.Loadcsv( or su.Loadcsv2(, then import into the table
The only issue I see with using B4j route is that your csv file must have a header row to create the column names and also, the table is created without an index which you have to create at some point.
3. I don't think you needed to go down to Java 8. Java 11 is what i use and it works.
 
Upvote 0

trepdas

Active Member
Licensed User
You can do it all within B4A:
1. Create the database and table with its structure and the table indices if needed.
2. Using StringUtilities, Load your csv file into a list using either su.Loadcsv( or su.Loadcsv2(, then import into the table
The only issue I see with using B4j route is that your csv file must have a header row to create the column names and also, the table is created without an index which you have to create at some point.
3. I don't think you needed to go down to Java 8. Java 11 is what i use and it works.

Thank you !!
 
Upvote 0
Top