Loading SQLite extension [SQLITE_ERROR] SQL error or missing database (The specified module could not be found. )

Answered

I'm trying to load the spatialite extension for SQLite.

The module is on the PATH but rider can't find it / won't load it.

SELECT load_extension('mod_spatialite.dll'); -> [1] [SQLITE_ERROR] SQL error or missing database (The specified module could not be found. )

I've tried to add it to the startup script as well as from the console.

My unit tests can load the extension and interact with the db but now I would like to use riders smart sql features for further development.

Any trouble shooting ideas?

Thanks in advance.

 

2 comments
Comment actions Permalink

Update: Seems that the unit tests stopped working too on this PC, same error. This is probably not a rider issue but my config issue.

Which is strange considering I can load the extension on the terminal just fine.

0
Comment actions Permalink

Hello, sorry for the late reply.

Please try load it that way:

SELECT load_extension('D:\Unity Projects\Spatialite\mod_spatialite\mod_spatialite.dll');

if it still fails, you can try to run 'Dependecy walker' utility against 'mod_spatialite.dll' to see if all necessary dll's are in place.

Also, please read the last part of this article - it could be helpful https://github.com/sqlitebrowser/sqlitebrowser/wiki/SpatiaLite-on-Windows

 

 

0

Please sign in to leave a comment.