B4X FEED Csv to SQLite program (klaus)

اطلاعات موضوع

درباره موضوع در تاریخ, در دسته b4xfeed ایجاد شده و آغاز کننده آن practicalsoftمی باشد و موضوع آن: Csv to SQLite program (klaus) است. این موضوع تا کنون 21 بازدید کننده و, 0 پاسخ داشته و 0 بار پسندیده شده...
نام دسته b4xfeed
نام موضوع Csv to SQLite program (klaus)
آغاز کننده موضوع practicalsoft
تاریخ شروع
پاسخ‌ها
0
بازدیدها
21
پسندها
0
آخرین ارسال توسط PracticalSoft
Jun 6, 2020
11,593
4,508

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.

 

عقب
بالا