Re: [gnome-db] loading sqlite extensions with gda?
- From: Vivien Malerba <vmalerba gmail com>
- To: "Leibowitz, Michael" <michael leibowitz intel com>
- Cc: gnome-db-list gnome org
- Subject: Re: [gnome-db] loading sqlite extensions with gda?
- Date: Sun, 23 Oct 2011 15:37:55 +0200
On 22 October 2011 19:45, Leibowitz, Michael
<michael leibowitz intel com> wrote:
Hi,
I'm trying to use the spatialite plugin to sqlite3 through gda (gdamm,
actually), without much luck. I'm trying to load the plugin as
follows:
_connection->statement_execute_select(
"SELECT load_extension('libspatialite.so.2')");
I don't get an error with that (it doesn't throw, at least), but the
next line throws:
_connection->statement_execute_select("SELECT InitSpatialMetadata()");
I get a "no such function" message in the error.
Is it possible to load extensions into sqlite3 this way? Is there
another way? Am I doing something obviously wrong? Why don't I get
an error from the SELECT load_extension?
Hi!
I had never had to load extensions, so I had never tested it. However it should work...
I have added a new option to pass when opening an SQLite connection ("EXTENSIONS=TRUE") to enable extensions loading (as a security measure as mentionned on SQLite's web site).
This is now corrected in Git master branch (see
http://git.gnome.org/browse/libgda/commit/?id=1c2327652b24a7c457d52496b1973082bd7871ea) and will be part of the 4.2.10 and 5.0 versions.
See the standalone example attached I used to make the test (using an example extension).
Regards,
Vivien
Attachment:
20111023_sqlite_extension.tbz
Description: application/bzip-compressed-tar
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]