B4J Question JSQL and UcanAccess

Enrique Gonzalez R

Well-Known Member
Licensed User
Good day!

I am working with Access and B4J via UcanAccess, so far so good, everything works with the SQL class provided in JSQL library, the only thing i cannot make it work is TransactionSuccessful method, it is funny because the BeginTransaction actually is doing the job, but because even when the code arrives to TransactionSuccessful, the data is not commited.

According to UcanAccess you have to do something like this:

Connection conn=DriverManager.getConnection("jdbc:ucanaccess://<mdb or accdb file path>",user, password);

st =this.ucaConn.createStatement();
st.executeUpdate("update example4 set descr='Lugo di Romagna'"); 
st.execute("insert into example4 (ID, descr) values(5,'DALLAS')"); 
i think it would be easy to "Extract" the connection from the SQL class like with JavaObject and again with JO make the commit, but i do not know how to do that.

Thanks for reading all the way through here!! and for helping me!

Enrique Gonzalez R

Well-Known Member
Licensed User
Thanks Erel.

I am afraid that for this project I am stuck with access.

If I do not set up a transaction everything works fine, all the changes are commited


Well-Known Member
Licensed User
Last edited:

Enrique Gonzalez R

Well-Known Member
Licensed User
Thank you jmon!

my bad, that i did not write the answer here for other people to know!

My solution was a bit different, with javaobject i called a small function in inline java running the method of SQL.

I was so naive back then! jeje


Active Member
Licensed User
Hi Erel,

Nothing wrong with MS Access. Out of all the products MS make it's the only one that i like. Unlike sqLite, MS Access is true multi user and with record locking. It provides transactional database functionality at the VBA level.

For small businesses with less than 100 users MS Access is low cost and with VBA using record-sets it is very easy to program quite complex functions.

MS Access is used as the database engine for process tag management at Loy Yang B Power Station and manages about 40,000 tags each with related tables for most of the fields. We also used it in the business system for budgeting, with about 30 users on at any-one time. All developed in-house by power station engineers, not expensive IT experts. The accountants replaced it with a proprietary system costing over three hundred thousand which trashed all of the intrinsic MS Access functionality like filters and on the fly queries and reports, so that instead of taking one screen to find a project it took 14.

The engineering personnel went back to using Excel spread sheets for their budgeting activities. Right where they started.

We also used MS Access for downloading plant historian data with millions of records of up to 100 double float fields.

Professional database programmers hate MS Access because it doesn't make them any money!