Sqlite3 create database and table with load.bat file and fill data to table example.
- Create folder for your project: my_sqlite_project
- Open folder and create file load.bat and paste to load.bat this text and save to project folder:
sqlite3 my_database.s3db < load_text.sql pause
- Create load_text.sql file and paste this text and save to project folder:
CREATE TABLE [android_metadata] ( [locale] TEXT ); CREATE TABLE [my_table] ( [_id] int NULL, [word] VARCHAR(255) NULL, [description] VARCHAR(255) NULL .separator ";" .import text_file.txt my_table
- Create text_file.txt and paste this text and save it as UTF-8:
1;word1;my first word 2;word2; my second word
- Download sqlite3.exe and put to project folder.
- Run BAT file load.bat and read text instruction from console
- If database created you can open and edit this with sqlite database explorer
- Copy database to Asses Android project folder
- If you want using this database in Android application on device, you have to copy this database to folder on device /data/data/com.MyPackage/databases/