Version: 1.00
GitHub: https://github.com/pyhoon/closedb-b4j
We may want a single file downloaded from FTP client from our VPS.
This tool will set the journal mode to DELETE if it is not, e.g journal mode is WAL.
References:
https://www.b4x.com/android/forum/threads/b4x-sql-setting-the-journal-mode.136211/
https://www.b4x.com/android/forum/threads/webapp-concurrent-access-to-sqlite-databases.39904/
to
GitHub: https://github.com/pyhoon/closedb-b4j
Description
When we initialized a sqlite database file with journal mode = WAL, it will create 3 files, a sample.db, sample.db-shm and sample.db-wal files.We may want a single file downloaded from FTP client from our VPS.
This tool will set the journal mode to DELETE if it is not, e.g journal mode is WAL.
References:
https://www.b4x.com/android/forum/threads/b4x-sql-setting-the-journal-mode.136211/
https://www.b4x.com/android/forum/threads/webapp-concurrent-access-to-sqlite-databases.39904/
Installation
- Download the jar: https://github.com/pyhoon/closedb-b4j/releases/download/v1.00/closedb.jar (3.12MB)
- Put the jar file inside
- B4J project or jar path (Objects folder in development)
- B4J Additional Libraries folder (see the last section at bottom)
Usage
Option 1: Using Macro to call closedb.jar with argument (most straight forward)- Add the following Macro
B4X:#Macro: Title, CloseDB, ide://run?File=closedb.jar&Args=sample.db - Activate the Macro from B4J IDE
- Download sample sqlite.ini file: https://github.com/pyhoon/closedb-b4j/releases/download/v1.00/sqlite.ini
- Note: You can also reuse the sqlite.ini in Pakai Server project
- Put sqlite.ini inside B4J server app or project Objects folder
- Edit sqlite.ini with your DbDir and DbFile
- Add the following Macro
B4X:#Macro: Title, CloseDB, ide://run?File=closedb.jar - Activate the Macro from B4J IDE
- Download sample batch file: https://github.com/pyhoon/closedb-b4j/releases/download/v1.00/closedb.bat
- Put closedb.bat inside B4J server app or project Objects folder
- Edit closedb.bat to include path of the sqlite db file e.g C:\Java\jdk-19.0.2\bin\java -jar closedb.jar sample.db
- Add the following Macro
B4X:#Macro: Title, CloseDB, ide://run?File=%PROJECT%\Objects\closedb.bat - Activate the Macro from B4J IDE
- Download sample batch file: https://github.com/pyhoon/closedb-b4j/releases/download/v1.00/closedb.bat
- Download sample sqlite.ini file: https://github.com/pyhoon/closedb-b4j/releases/download/v1.00/sqlite.ini
- Note: You can also reuse the sqlite.ini in Pakai Server project
- Put sqlite.ini inside B4J server app or project Objects folder
- Edit sqlite.ini with your DbDir and DbFile
- Add the following Macro
B4X:#Macro: Title, CloseDB, ide://run?File=%PROJECT%\Objects\closedb.bat - Activate the Macro from B4J IDE
- Download sample batch file: https://github.com/pyhoon/closedb-b4j/releases/download/v1.00/closedb.bat
- Put closedb.bat inside B4J server app or project Objects folder
- Edit closedb.bat to include path of the sqlite db file e.g C:\Java\jdk-19.0.2\bin\java -jar closedb.jar sample.db
- Execute the closedb.bat
- Download sample batch file: https://github.com/pyhoon/closedb-b4j/releases/download/v1.00/closedb.bat
- Download sample sqlite.ini file: https://github.com/pyhoon/closedb-b4j/releases/download/v1.00/sqlite.ini
- Note: You can reuse the sqlite.ini in Pakai Server project
- Put both files inside B4J server app or project Objects folder
- Edit sqlite.ini with your DbDir and DbFile
- Execute the closedb.bat
Call from B4J Additional Libraries folder
If you put the closedb.jar inside B4J Additional Libraries folder, update the Macro from
B4X:
#Macro: Title, CloseDB, ide://run?File=closedb.jar&Args=sample.db
B4X:
#Macro: Title, CloseDB, ide://run?File=%ADDITIONAL%\closedb.jar&Args=sample.db
Last edited: