CSV to SQLite tool
I was using this nice little tool as education and got into trouble with it crashing at the SQL query.
After some debugging I found I had changed the csv file name to include "-" minus sign, which gets carried over in the database name.
I don't know much SQL but the minus sign obvioulsy causes problems.
Error was:
java.sql.SQLException: [SQLITE_ERROR] SQL error or missing database (near "-": syntax error)
I guess the (near "-": syntax error) is an obvious pointer to the problem, but I was looking inside the csv file, not in the title becomimg a table name.
I changed this line in the code to add the replace
I suspect there must be other characters that have the same issue but I will stick with underscore now.
Thanks for a nice clear B4J demonstration program.
I was using this nice little tool as education and got into trouble with it crashing at the SQL query.
After some debugging I found I had changed the csv file name to include "-" minus sign, which gets carried over in the database name.
I don't know much SQL but the minus sign obvioulsy causes problems.
Error was:
java.sql.SQLException: [SQLITE_ERROR] SQL error or missing database (near "-": syntax error)
I guess the (near "-": syntax error) is an obvious pointer to the problem, but I was looking inside the csv file, not in the title becomimg a table name.
I changed this line in the code to add the replace
DBFileName = txfDataBaseFileName.Text.replace("-", "_"):
I suspect there must be other characters that have the same issue but I will stick with underscore now.
Thanks for a nice clear B4J demonstration program.