Aug 22, 2025 Replies: 7 [B4X] B4XTable Sample 1A sample project to demonstrate loading SQLite data into B4XTable Android Devices data (JSON) downloaded from Internet GitHub: https://github.com/pyhoon/B4XTableSample-B4X [B4X] B4XTable Sample 2Another sample project to demonstrate loading SQLite data into B4XTable Sample Customers data inserted from code GitHub: https://github.com/pyhoon/B4XTableSample-B4X/tree/main/example2 Features Use OkHttpUtils to download json file from a URL Parse the JSON as List and extract each item as Map Store the data into SQLite database Perform CRUD functions like add, retrieve, edit, delete rows Use B4XPreferencesDialog to show the panel for input Jump to a row in B4XTable Why I created this sample projectB4X developers often confuse or don't understand how to load and save data between an SQL database and use B4XTable to display the data. B4XTable uses a in-memory database for it's internal operation. It has a single table name "data" with columns start with c0, c1, c2 and so on. Developers should not mix the internal db with their actual database. This sample shows how we can interact and work with B4XTable by connecting it to a SQLite database. In fact, B4XTable is so powerful that it actually can work with CSV files or non SQL database. Screenshots Attachments example1.zip example1.zip 21.3 KB · Views: 341 example2.zip example2.zip 21.4 KB · Views: 385 Last edited: Sep 20, 2025 Click to expand...
[B4X] B4XTable Sample 1A sample project to demonstrate loading SQLite data into B4XTable Android Devices data (JSON) downloaded from Internet GitHub: https://github.com/pyhoon/B4XTableSample-B4X [B4X] B4XTable Sample 2Another sample project to demonstrate loading SQLite data into B4XTable Sample Customers data inserted from code GitHub: https://github.com/pyhoon/B4XTableSample-B4X/tree/main/example2 Features Use OkHttpUtils to download json file from a URL Parse the JSON as List and extract each item as Map Store the data into SQLite database Perform CRUD functions like add, retrieve, edit, delete rows Use B4XPreferencesDialog to show the panel for input Jump to a row in B4XTable Why I created this sample projectB4X developers often confuse or don't understand how to load and save data between an SQL database and use B4XTable to display the data. B4XTable uses a in-memory database for it's internal operation. It has a single table name "data" with columns start with c0, c1, c2 and so on. Developers should not mix the internal db with their actual database. This sample shows how we can interact and work with B4XTable by connecting it to a SQLite database. In fact, B4XTable is so powerful that it actually can work with CSV files or non SQL database. Screenshots
P PaulMeuris Well-Known Member Licensed User Aug 22, 2025 #2 Error trying to run: Caused by: java.io.FileNotFoundException: template.json Click to expand... In line 141: B4X: PrefDialog.LoadFromJson(File.ReadString(File.DirAssets, "template.json")) There was a warning: B4XMainPage - 141: File 'template.json' is missing from the Files tab. (warning #17) Click to expand...
Error trying to run: Caused by: java.io.FileNotFoundException: template.json Click to expand... In line 141: B4X: PrefDialog.LoadFromJson(File.ReadString(File.DirAssets, "template.json")) There was a warning: B4XMainPage - 141: File 'template.json' is missing from the Files tab. (warning #17) Click to expand...
aeric Expert Licensed User Longtime User Aug 22, 2025 #3 PaulMeuris said: Error trying to run: In line 141: B4X: PrefDialog.LoadFromJson(File.ReadString(File.DirAssets, "template.json")) There was a warning: Click to expand... Steps: 1. Extract the project. You will get a folder name "source". 2. Open a project e.g B4J 3. Run Debug. The file template.json should be copied from Shared Files folder to Files folder. 4. Click "Sync" button in Files Manager tab. Alternatively, you can manually use the comment link: B4X: 'Sync files: ide://run?file=%WINDIR%\System32\Robocopy.exe&args=..\..\Shared+Files&args=..\Files&FilesSync=True
PaulMeuris said: Error trying to run: In line 141: B4X: PrefDialog.LoadFromJson(File.ReadString(File.DirAssets, "template.json")) There was a warning: Click to expand... Steps: 1. Extract the project. You will get a folder name "source". 2. Open a project e.g B4J 3. Run Debug. The file template.json should be copied from Shared Files folder to Files folder. 4. Click "Sync" button in Files Manager tab. Alternatively, you can manually use the comment link: B4X: 'Sync files: ide://run?file=%WINDIR%\System32\Robocopy.exe&args=..\..\Shared+Files&args=..\Files&FilesSync=True
P PaulMeuris Well-Known Member Licensed User Aug 22, 2025 #4 Sorry, i'm using B4J version 10.00 and the macro's are not supported... B4XMainPage - 3: Attribute not supported: macro Click to expand... I commented out all the macro lines... I didn't think about the shared files folder...
Sorry, i'm using B4J version 10.00 and the macro's are not supported... B4XMainPage - 3: Attribute not supported: macro Click to expand... I commented out all the macro lines... I didn't think about the shared files folder...
aeric Expert Licensed User Longtime User Aug 22, 2025 #5 PaulMeuris said: Sorry, i'm using B4J version 10.00 and the macro's are not supported... I commented out all the macro lines... I didn't think about the shared files folder... Click to expand... OK. I think you also commented the CustomBuildAction B4X: #CustomBuildAction: folders ready, %WINDIR%\System32\Robocopy.exe,"..\..\Shared Files" "..\Files" CustomBuildAction is seldom used but I use it to reduce the zipped file size and avoid deploying redundant file. Last edited: Aug 22, 2025
PaulMeuris said: Sorry, i'm using B4J version 10.00 and the macro's are not supported... I commented out all the macro lines... I didn't think about the shared files folder... Click to expand... OK. I think you also commented the CustomBuildAction B4X: #CustomBuildAction: folders ready, %WINDIR%\System32\Robocopy.exe,"..\..\Shared Files" "..\Files" CustomBuildAction is seldom used but I use it to reduce the zipped file size and avoid deploying redundant file.
Magma Expert Licensed User Longtime User Aug 22, 2025 #7 If you add row Selection - for current row, editing - or when returns from editing, add new, delete record, will be super!
If you add row Selection - for current row, editing - or when returns from editing, add new, delete record, will be super!
aeric Expert Licensed User Longtime User Aug 22, 2025 #8 Magma said: If you add row Selection - for current row, editing - or when returns from editing, add new, delete record, will be super! Click to expand... I am not really get you but this is just an example. Anyone can modify it for other use case.
Magma said: If you add row Selection - for current row, editing - or when returns from editing, add new, delete record, will be super! Click to expand... I am not really get you but this is just an example. Anyone can modify it for other use case.