How to use SQlite in order to create offline tables?

Hi, guys. I really need your help! I’m creating an app that will replace a manually filed paper table, and it means I need this app to create OFFLINE TABLES, with no use of internet. I’m still learning how to use Kodular. Could you guys, please, help me?

@Andrey_Almeida Have you checked documentation below?

1 Like

Hello Andrey,
First of all, welcome to our forum. I’m still a greenhorn myself with Kodular, but I can already give you some things regarding offline databases. SQLite works without problems if you follow a few basic things.
Do not put this database in the assets directory!
Because you can only read it from the database. Create your own directory in the mobile device and almost all problems are solved.

Something like the way above. Not perfect but it should only show you how to get around your first problems.


1 Like

if you want to prepare some tables as initial database, then this database could be stored very well inside the assets of the app… on first run of the app just import the database from there…

@franz1 your blocks look a bit cumbersome, you might want to take a look at the example project here App Inventor Extensions: SQlite | Pura Vida Apps, which uses my sqlite extension, but the logic to read the initial database on first run of the app is the same for the Kodular sqlite component

also there is no need to export the database after closing the database, because after restarting your app your database is still there, same as TinyDB…you only have to export the database for backups or similar…
note: there is no need to import the database on each run of the app, only on first run to load the initial database…


1 Like

I’ll give you two blocks of an app that I have a version of the bible to clarify your ideas.

1 Like

I’m gonna try to understand what you did. A huge thank yoooooou.

I’ll read the stuff of the link!! Great tips, thank u!!

I’ll take a look at it. Thaaaaank you!!!

Mate, I’m gonna try this way. Thank you for the tips!!!

Auceli Neto, você poderia me passar seu número do whatsapp para eu poder conversar com você?

Hello Taifun,

After all the hiccups when starting with SQLite and from my point of view insufficient or rather complete documentation. At least I could help myself with that. By the way, you are my anchor in the surf in this area, thank you for that.

However, none of these can hide the fact that these tips and hints are nowhere in the documentation. Perhaps the core team should think about whether it would not make sense to place a documentation team that could do the work for the community.

I would participate immediately and spontaneously if something like that was launched.


Where is the call.SQLite1.ImportDatabase function? Is this an extension rather than what comes default?

I think that after looking, you will see that it is an extension.

This post was flagged by the community and is temporarily hidden.

No one is allowed to provide a paid extension for free. Please do not ask again such a question in the community

1 Like