B4J Question Missing features in installed Sqlite version sqlite-jdbc-3.7.2

johnerikson

Active Member
Licensed User
Longtime User
If I use some sqlite functions like the below in B4J :
SELECT ID, xxxxxFile, xxxxxID FROM Xxxxxxxx WHERE (Type = 1 or Type = 3) AND unixepoch(substr(xxxxxID,1,10)) >= 1664056800 AND
unixepoch(substr(XxxxxID,1,10)) <= 1727215200 and XxxxxFile Is Not NULL And UserID = 2

I get the following error message: java.sql.SQLException:
[SQLITE_ERROR] SQL error or missing database (no such function: unixepoch)
I have a SQLITE browser that has all the features so I can test the sql statements. No error-

How to complete features or which version makes them available for B4J?
 

Chris2

Well-Known Member
Licensed User
Longtime User
According to this, unixepoch() wasn't introduced until SQLite v3.38.0. So you need to use a later version of the sqlite jdbc driver.
You can download a later version via the updates list that @Claudio Oliveira maintains:

Put the downloaded sqlite-jdbc-3.******.jar into you Additional Libraries folder, and change #AdditionalJar: declaration to suit the version you're using:
B4X:
#AdditionalJar: sqlite-jdbc-3.38.0.0    'to suit the file version you're using'
 
Upvote 1
Top