B4J Question MSSQL DRIVER Issue

Peter Lewis

Active Member
Licensed User
Longtime User
Hi, I have the following additional jar
B4X:
#AdditionalJar:mssql-jdbc-12.8.2.jre11
#AdditionalJar: HikariCP-5.0.1
then I am using Java jdk-19.0.2
To init the pool we are using

B4X:
Public pool As HikariCP
pool.Initialize("com.microsoft.sqlserver.jdbc.SQLServerDriver",$"jdbc:sqlserver://${host}:${port};databaseName=${database}"$,user,password)

with the following code starting sql

B4X:
Dim sql As SQL = pool.GetConnection

The error code I am getting is as follows

java.lang.RuntimeException: Failed to get driver instance for jdbcUrl=com.microsoft.sqlserver.jdbc.SQLServerDriver

The .jar file is in the additional files folder and I cannot see what I have done wrong.

Thank you
 
Top