B4J Question [ABMaterial - Back to Basics] How do I connect to a local database?


Licensed User
Hi guys,

Been away for a while due to Professional changes, a computer malfunction, life...

Anyway, trying to get back on this train, I get "stuck" on what would be basic stuff.

I need, for dev purposes, to create and access a SQLite Database, using SQLite Expert to create it, but how should/can I later access it from ABM?

Can anyone please provide a simple example of the connection code ...
Last edited:


Licensed User
ABMaterial For Dummies provides examples for MySQL. The DBM code module in ABM shows how to init MySQL or SQLite (SQL) objects.
Personally, IMHO, I would NOT use SQLite for a server DB - if it can be avoided (which is usually the case). Just search the hoops and bounds (headaches) you must accomplish to use it successfully on your server (on the forums).

Again, IMHO, SQLite is a compact DB - designed for mobile devices - where it works flawlessly. Use an industrial DB on servers (or lose your hair from stress (bad) - not from headboard extraction (good) ).

Your request is exactly how I started on my path with B4X - and ABM.

I use SQLite Expert to create (maintain) the device DB to include with the mobile app.
I use RDC to send data from devices (SQLite tables - device side) to server MySQL tables (server side) - effortlessly and seamlessly!
Same thing in reverse (server to device).

The SQL dialect is so similar (if not exact - between the two) that there are few times where you need to compensate for differences ( creating table structures does differ slightly - be aware - easily overcome ).

@Cableguy , I think you already know 99 percent of this - based on your many informative posts (and your Expert forum status confirms).
You are reaching for confirmation, of which you already know and understand, to assure your assumptions are correct.

I only wish that I would use this (your) reach out for support - before I steer myself down the wrong path based on my (flawed) assumptions.

Re-review (you went thru it once) the (specific) lessons on ABM for Dummies. However, it does not discuss SQLite connectors (jars) specifically.

Upvote 0


Licensed User
Hi @Harris,

Thanks for your many kind words in your reply.
I've just noticed that I left out an important detail : during development the dB will sit inside the same PC, so my issue is how will the connection path look like.
I have connected to remote DB before, so my issue is not how to connect but rather the relative (?) path to set in the connection.

I'm coming back to B4J and ABM after over a year without touching ABM and almost no major coding in B4J.
Yesterday I struggled with the most basic of basics in ABM: Theming.

So, yeah, I apologize for "sounding" like a noob, but I often say, I'm an Expert at asking noob questions...

BTW, taking your suggestion of not going with sql, what tools and DB would you suggest to ease my effort of testing?
Last edited:
Upvote 0