Hi All,
I've wasted lot of time trying to find a workable tool to covert a larger than the original database edited Excel worksheet csv file into a db file for my SQLite project. I've tried Klaus's tool at https://www.b4x.com/android/forum/threads/csv-to-sqlite-program.87061/ but it's too advanced for me to use. I've tried the fishcode tool suggested by Rboeck at https://fishcodelib.com/DBMigration.htm and I didn't succeed there either. I've tried the google solution from sqlitetutorial.net. I simply want to convert my edited Excel csv file>.db by renaming the existing db file and replacing it in my project files folder. What can I do? Thanks
P.S. my project compiles fine and here it is.
Now I'm trying your program Klaus......... This program: Convert .Net Free (Non-Commm.....v9.7.7671.3. Wait, I guess that might not be it either. I'll try downloading it again.
When I extract the contents of your zip folder(17.6KB), I see a B4a Object Browser. I click it and I see no Load CSV button Now I'll try the smaller zip folder.
Sorry, but I do not understand what you are doing.
I downloaded the zip file from this thread: https://www.b4x.com/android/forum/threads/csv-to-sqlite-program.87061/
And the zip file CsvToSQLite.zip is the B4J project.
And the CsvToSQLiteExe.zip is an exe file, the stand alone program generated with Build Standalone Package.
This is the image of the program !
The smaller zip file extracts to display an application icon which will not activate when clicked. The application is called J CsvToSQLite. It will not activate. Maybe it will work now. I'm trying: run as administrator. Nope! It still did not activate.
As I explained in the CsvToSQLite thread, on my computer with the McAfee antivirus, the program is rejected. Maybe it is the same on your computer.
Do you have the B4J IDE installed on your computer?
If yes use the B4J CsvToSQLite.b4j project.
I have a different antivirus (Eset Nod32) perhaps that's what you are getting at; my antivirus is a stopper? I have recently downloaded B4J so maybe I can drag your icon onto the B4J after the B4J is activated?
Since you continue to have problems using klaus's convert although, not hard at all, if you want to post your csv file and I am sure someone will be able to convert it for you with DB Browser to a table in a database with the same version you have. If your file is a good csv file, DBBrowser will handle it
Thanks Mahare, an error I got said that my comma delimited file was read only. Perhaps my saving was strange, giving read only? But that error was with the DB Browser I think. My plan is to continue to edit my database adding records, etc., with an excel csv file. Consequently, I need to master this converting of my excel csv file to a db file, rather than continuing to ask for help. New: When I look at the properties of the csv excel file, the file is not a read only file.
You say that you downloaded B4J.
1. Did you install it?
2. Can you run the B4J IDE, the same way as B4A?
3. Can you create a simple B4J project with the B4J IDE?
4. If yes, you have downloaded the CsvToSQLite B4J project and unzipped it in a folder.
5. Simply, run the B4J IDE and load the CsvToSQLite.B4j project from the folder where you unzipped the project, like you do when you load a B4A project in the B4A IDE.
I do not understand what you are trying to do with dragging?
OK I loaded it and now I'll run it but where will it display and be ready for me to load my csv file? I guess I'll find out. Running now; it seems to be running ok. I'll just try to find where the db file saved.
When I click convert, I can't tell where the db file might be. Also, when I click convert, the converter disappears and in the IDE logs it displays an error in the logs....first lines:
Error occurred on line: 174 (Main)
java.sql.SQLException: [SQLITE_ERROR] SQL error or missing database (near "Table": syntax error)
at org.sqlite.DB.newSQLException(DB.java:383)
at org.sqlite.DB.newSQLException(DB.java:387)
When you load a csv file in the CsvToSQLite program, the bd file is saved in the same folder!
As already suggested by Mahares, post your csv file and I will convert it with the CsbToSQLite program to see if there is any problem.
The uploaded file does not have an allowed extension. The following extensions are allowed: .zip, .txt, .pdf, .png, .jpg, .jpeg, .jpe, .gif, .apk, .bal, .bas, .jar, .xml, .java, .b4xlib, .b4xtemplate
Maybe becasue I've been editing my csv excel file I'm producing a problem. Perhaps I should edit my simple excel workbook and after editing it, convert it to csv before converting the csv file to a db file.