Hello Peter,
I am currently working with OPL 20.1 on a windows 64 laptop. The database I am trying to connect to is a
sqlite 3.33.0 local database, using a
sqlite 3.27.2 JDBC driver.
The method I am using to read the database into OPL is using statements in a .dat file, the code is shown below:
JDBCConnection conn("jdbc:sqlite:product_data.db", "DROP TABLE IF EXISTS results; CREATE TABLE results (Product VARCHAR, Inside INTEGER, Outside INTEGER)");Products from JDBCRead(conn, "SELECT name, demand, insideCost, outsideCost, consumptionFlour, consumptionEggs FROM products");Results to JDBCPublish(conn, "INSERT INTO results VALUES(?, ?, ?)");
In addition to this, the JDBC driver is downloaded and set as an environment variable
ODMS_JAVA_ARGS to make it available to the JVM used by OPL.
The problem is that when trying to execute the previously shown code, I get the following error:
No suitable driver found for jdbc:sqlite:product_data.db.I have also tried with a database locally hosted with MySQL 8.0.22 and the respective driver with the same results.
Thanks,
------------------------------
Juan David Zambrano
------------------------------
Original Message:
Sent: Wed December 23, 2020 10:20 AM
From: Petr Vilím
Subject: No suitable driver found for jdbc:sqlite
Hello,
I'm afraid that the question is too generic. Could you give us more details? What operation system are you using? What version of the database etc? Could you copy what exactly you're doing and what response you get?
Thanks, Petr
------------------------------
Petr Vilím
IBM
------------------------------