On Mon, 19 Oct 2020 13:08:05 -0700 (PDT), 'Alex Z' via SpatiaLite Users
wrote:
> Now when link a table into Access and try to update a row with
> geometry, I get the following instead of the error above: "no such
> module RTREE". So it appears I did load spatialite correctly. When
> read about RTREE, I learned that it has to be enabled in the
> sqlite3.exe when it's compiled? Is that correct? Is there no way to
> dynamically load the rtree functionality when creating the ODBC
> connection like I did with the spatialite module?
>
Hi Alex,
when building libsqlite3 supporting the RTREE is a configurable
option (enabled by default in all recent versions).
once that the library has been built disabling the option there
is absolutely no way to reanable it at run-time, because all
the relevant code has been ignored during the compilation.
> I think the ODBC driver is using the sqlite3.exe executable that I
> unpacked into its default directory: C:Program Files (x86)SQLite ODBC
> Driver. And I'm assuming that it does not include the rtree functions
> (it's only 62kb). So I renamed it to sqlite3_orig.exe and then copied
> the sqlite3.exe file that I downloaded into the ODBC driver
> directory.
> I got the same rtree error (I was pretty surprised that it opened the
> gpkg table at all!). Then I deleted the sqlite3.exe all together and
> the table still opened (so maybe the sqlite3.exe isn't needed at
> all).
>
I strongly doubt that the ODBC driver depends on sqlite3.exe
it looks more realistic assuming that a copy of libsqlite3 is
statically linked to the driver itself. or, may be, it depends
on same specific DLL.
if this is your case, there is no way to circumvent the issue if
not by recompiling the ODBC driver starting from the source code
after enabling the RTREE module.
alternatively, there are several open source sqlite ODBC drivers,
such as
https://github.com/softace/sqliteodbc
bye Sandro