B4J Question [Solved] SQLite use with new Version?

mw71

Well-Known Member
Licensed User
Longtime User
hi,

i have
- add #AdditionalJar: sqlite-jdbc-3.31.1 (in Main Window at Project Attributes, File in Libary Folder)
- use ist with sql_k.initializesqlite
but with
B4X: Copy
Log(SQL_K.ExecQuerySingleResult( "SELECT sqlite_version()"))
(after load a File) i get 3.7.2 ???

What's the rigth way to use a newer SQLite Version??
 
hi,

i have
- add #AdditionalJar: sqlite-jdbc-3.31.1 (in Main Window at Project Attributes, File in Libary Folder)
- use ist with sql_k.initializesqlite
but with
B4X: Copy
Log(SQL_K.ExecQuerySingleResult( "SELECT sqlite_version()"))
(after load a File) i get 3.7.2 ???

What's the rigth way to use a newer SQLite Version??

I tried your code and it gave me the correct versions, with 2 different jdbc driver
'#AdditionalJar: sqlite-jdbc-3.27.2.1
#AdditionalJar: sqlite-jdbc-3.36.0.1
 
Upvote 0
Hello,

The version history of SQLite is known, so I want to use a newer version. The function I need was added in 3.7.15.

I have the download from https://repo1.maven.org/maven2/org/xerial/sqlite-jdbc/, others are also available. I copied the JAR file to the User Libary directory.

Unfortunately it always uses the 3.7.2 JAR from the internal directory (is this possible through a library?).
 
Upvote 0
copy jar to Additional Libraries

See:
1641282206226.png

B4J:
1641282264332.png

1641282296085.png
 
Upvote 0
sample:
1641285183514.png

Main:
B4X: Copy
#Region Project Attributes
    #MainFormWidth: 600
    #MainFormHeight: 600
    #AdditionalJar: sqlite-jdbc-3.36.0.3
#End Region

Sub Process_Globals
    Private fx As JFX
    Private MainForm As Form
End Sub

1641284905002.png
 

Attachments

Upvote 0
sample:
View attachment 123787
Main:
B4X: Copy
#Region Project Attributes
    #MainFormWidth: 600
    #MainFormHeight: 600
    #AdditionalJar: sqlite-jdbc-3.36.0.3
#End Region

Sub Process_Globals
    Private fx As JFX
    Private MainForm As Form
End Sub

View attachment 123785
Test, it's show the correct Version 3.36...., than it crash (no problem)

Add B4XTable (i use this, V 1.21), it show 3.7.2
Is there any solution?
 
Upvote 0
See found error:
manifest B4Xtable
Version=1.21
B4J.DependsOn=B4XFormatter.b4xlib, jSQL, sqlite-jdbc-3.7.2
B4A.DependsOn=B4XFormatter.b4xlib, SQL
B4i.DependsOn=B4XFormatter.b4xlib, iSQL
main:
B4X: Copy
#Region Project Attributes
    #MainFormWidth: 600
    #MainFormHeight: 600
    #AdditionalJar: sqlite-jdbc-3.36.0.3
#End Region

Sub Process_Globals
    Private fx As JFX
    Private MainForm As Form
End Sub
1641294492879.png
 
Upvote 0
hi,

my solution is to change the Line
B4J.DependsOn=B4XFormatter.b4xlib, jSQL, sqlite-jdbc-3.7.2
in the Copy of B4XTable Libary to sqlite-jdbc-3.36.0.3

Thank for your Help.
 
Upvote 0
Back
Top