Hi Peter, This usually happens if a library (qsqlocispatial.dll) is not able to load its dependencies.
I usually use Process Monitor (https://docs.microsoft.com/en-us/sysinternals/downloads/procmon) or Dependency Walker (https://www.dependencywalker.com/) to track those issues. Are you trying to access an Oracle database? Then you might have to install the Oracle Instant Client: https://www.oracle.com/database/technologies/instant-client/winx64-64-downloads.html Best regards, Stefan From: QGIS-Developer <[email protected]> On Behalf Of [email protected] Sent: Friday, March 19, 2021 3:00 PM To: [email protected] Subject: [QGIS-Developer] QOCISPATIAL driver cannot be loaded Hello, I just compiled the qsqlocialspatial.dll from the QGis project and tried to use it with QSqlDatabase. QSqlDatabase db2 = QSqlDatabase::addDatabase("QOCISPATIAL"); When I startet the program it looked like the detection oft he sqldriver was successful. QFactoryLoader::QFactoryLoader() looking at "C:/Qt/5.14.2/msvc2017_64/plugins/sqldrivers/qsqlocispatial.dll" Found metadata in lib C:/Qt/5.14.2/msvc2017_64/plugins/sqldrivers/qsqlocispatial.dll, metadata= { "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface", "MetaData": { "Keys": [ "QOCISPATIAL8", "QOCISPATIAL" ] }, "archreq": 0, "className": "QOCISpatialDriverPlugin", "debug": false, "version": 331264 } Got keys from plugin meta data ("QOCISPATIAL8", "QOCISPATIAL") Later when I tried to actually use the driver I got the following output. QFactoryLoader::QFactoryLoader() checking directory path "C:/Users/Peter Steibert/source/repos/QtWidgetsApplication2/x64/Release/sqldrivers" ... "QtWidgetsApplication2.exe" (Win32): "C:\Qt\5.14.2\msvc2017_64\plugins\sqldrivers\qsqlocispatial.dll" geladen. Das Modul wurde ohne Symbole erstellt. "QtWidgetsApplication2.exe" (Win32): "C:\Windows\System32\wsock32.dll" geladen. "QtWidgetsApplication2.exe" (Win32): "C:\Windows\System32\wsock32.dll" wurde entladen. "QtWidgetsApplication2.exe" (Win32): "C:\Qt\5.14.2\msvc2017_64\plugins\sqldrivers\qsqlocispatial.dll" wurde entladen. Cannot load library C:\Qt\5.14.2\msvc2017_64\plugins\sqldrivers\qsqlocispatial.dll: Das angegebene Modul wurde nicht gefunden. QLibraryPrivate::loadPlugin failed on "C:/Qt/5.14.2/msvc2017_64/plugins/sqldrivers/qsqlocispatial.dll" : "Cannot load library C:\\Qt\\5.14.2\\msvc2017_64\\plugins\\sqldrivers\\qsqlocispatial.dll: Das angegebene Modul wurde nicht gefunden." QSqlDatabase: QOCISPATIAL driver not loaded QSqlDatabase: available drivers: QSQLITE QOCISPATIAL QOCISPATIAL8 QODBC QODBC3 QPSQL QPSQL7 Thanks in advance for your help Peter
_______________________________________________ QGIS-Developer mailing list [email protected] List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
