Yet another SQLite extension (Free)



First post!

For various reasons I decided to write a SQLite extension and now I’m open sourcing it.


Excerpt from the repository:


  • Control over database name
  • Import/export entire database
  • Convenience methods for common CRUD operations
  • In-line and asynchronous versions of data manipulation methods
  • Can use parameterized SQL statements (prevents SQL injection)
  • Query results returned as proper lists
  • Database life cycle events
  • Debug messages as Toast messages and/or dialogs
  • Begin, commit, and rollback transactions (nested too!)
  • Database versioning
  • and more!


Download AIX


If you find this extension useful, please consider donating by clicking the button below.
If you’re using this extension in an app you’re making money from, please STRONGLY consider donating even more.
The recommended donation is $10 USD, but I’ll accept anything you think the extension is worth to you.


There’s much more information in the repository.

How to make application CRUD with SQLITE
Multiple columns sqlite

Show some blocks and examples


I could but didn’t feel like repeating what I’d already written in the repository (on 3 different forums). There’s a lot of blocks. Call me lazy. I’d rather spend my time coding. Just click the GitHub link and all will be revealed.

What kind of examples would you like? I didn’t include any in the repo because it seems obvious to me. But I understand it may not be to everyone else. I’m not sure what kind of examples would be useful for others.


And all that in 71,6 KB. :wink::grin:


Yeah, it’s a little on the large side. It was even bigger before I ripped out a bunch of stuff I decided it didn’t need. On the other hand, you can do some real DB work with it, which is what I’m used to dealing with in the rest of my life.

There are smaller SQLite extensions available, but I haven’t found any that handle transactions or some of the other features I threw in. And mine is free.


I hope you didnt misunderstood me. I am impressed with all the things you put inside this, in my eyes, small size. Really impressed. :+1:


sir plz make any tutorial video about this .aix



Congratulations, really formidable. I look at it for good at the weekend. THANKS THANKS THANKS. Soon I will make a donation


Thank you for the extension. I am trying to import a database using the block shown below.

I am getting andriod_metadata as result and not displaying other table names. Please let me know how I can properly import the database.


The android_metadata table is a standard table that Android creates, so ignore that.

Have you turned on either of the debug options to see if there’s an non-DB error happening? It may be the database you’re importing can’t be found/opened, so the openDatabase is just creating a new DB.


Thanks for your immediate reply.

My test app contains a button, notifier and sqlite extension. I have enabled the DebugDialog option. I have uploaded the sql file to app media. I have tested the app using companion and also exported the app as an apk file. Following is the result I am getting on pressing the button.


SQLite: Database opened


SQLite: Database created


SQLite: Database imported


Apart from the above block in my previous message I do not have any other code in the block. I am not getting any other error. I tried other sql files and the test result is same. Please let me know if I’m missing anything.
Thanks and regards,


Is “exec.sql” a script file or a .db/.sql(new sqlite extension) file?
If is a script file you cannot import it. you need to use the ExecuteFile block. You can only use the ImpotDatabase block when you are using a .db/.sql file.


Thanks a lot. Now with ExecuteFile block its working.


I’m glad to hear you got it working. Lildinti is correct. ImportDatabase expects a fully formed SQLite database file, not raw SQL statements. Use ExecuteFile for raw SQL.

While trying to reproduce your problem I also noticed an oddity that could cause significant confusion. Android (or AppyBuilder) is displaying dialogs out of order. In your dialog sequence above, the order of the debug dialogs is in the reverse order of what actually happens in the extension. If you turn off DebugDialog and turn on DebugToast, you’ll see the correct order of execution. I’m not sure what causes this, but I imagine it could confuse folks.

I also came across another detail that even confused me a bit. When importing a database, then opening it, I see a message about the database being created (which also means the DatabaseCreated event fires). I didn’t expect that since the database should already exist after importing it. But then I realized, the database I imported didn’t have the android_metadata table in it (where the database version is stored), so it acts like the database is new and creates that table, firing the DatabaseCreated event. That’s something to look out for. I should probably add a note about that in the docs.


I’ve updated the docs in the repository.


but needs an example as an aia file


In the first message of this thread, there’s a link to github. click on it and in there(github), there is an AIA file to download that has all the functionality of the extension.
Gather you haven’t read all the thread, have you?


Thanks once again for the detailed explanation.


you’re very welcome!


thank you
i found the aia file
and it helps me understanding a lot of the extension blocks
but i have a question :
if i have a database like this one

and i convert it to a .sqlite db
and it works fine
i have used these blocks

the listpicker

and now i want to whe i select an item from the listpicker
then the water value will placed on the water textbox
in this case

according to the DB
it must be 11.2
how can i do it ?