Re: [sqlite] Issue with LoadExtension with Spatialite

2017-04-12 Thread Green Fields
I have had this problem. Essentially, precompiled binaries (SQLite3.dll,
and System.Data.Sqlite) for Windows do not appear to allow extension
loading using the SQL function.
I have raised this before,
http://sqlite.1065341.n5.nabble.com/Extension-Loading-td93885.html but it
may need custom compiling although I'm not sure what flags would be
required.
The Windows CLI does allow loading by SQL function
I didn't find a resolution here or at Spatialite




>Have you guys seen this?
>I think this is an issue with System.Data.SQLite for C#.
>I'm having the same issue.
>https://groups.google.com/forum/#!topic/spatialite-users/u2QZpQL_6ek
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problem compiling 3.17.0 in MSVS 12

2017-02-20 Thread Green Fields
I have attempted to compile 3.17.0 in MSVS using the 32 bit native command
line
No editing of sources was done
I have tried the amalgamation download with

cl sqlite3.c -link -dll -out:sqlite3.dll

and sqlite-autoconf-317.tar.gz with

nmake /f makefile.msc

In both cases the dll was produced without any messages.
File sizes were different and no functions appear to have been exported,
checking depends.exe
In the second case an apparently fully functional command line exe was
produced - nice

I am not very familiar with building c files.
What am I missing? MSVS has several command line programs, is that the
correct one in this case?
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Extension Loading

2017-02-13 Thread Green Fields
>You could create a user-defined function to call LoadExtension(), but
>why do you need to do this from SQL?

A good question, but I am attempting to use a different .Net wrapper for
this project which has not imported sqlite3_enable_load_extension().
The simplest thing would be to import the function myself -  except that I
don't have the C skills to translate the arguments to .Net compatibility.

Your reference and comments re the sql function being disabled is something
I hadn't fully understood. I can see that the library has been compiled with
 ENABLE_LOAD_EXTENSION
 so I guess that
means sql is disabled.
I might have to rethink how I approach this then. Perhaps have another look
at importing the function

Thanks for the help
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Extension Loading

2017-02-12 Thread Green Fields
Hi
I'm using System.Data.SQLite Nuget package and attempting to load an
extension.
All depenent libraries are in the bin\debug output directory.
Extension is 32 bit and the project is set to compile for 32 bit


Using

conn.EnableExtensions(true);(I think this is enabled by default)
conn.LoadExtension("mod_spatialite");

works fine, but I need to use the SQL function
 and

conn.EnableExtensions(true);
SQLiteCommand cmd = *conn.Create*Command();
cmd.CommandText = @"SELECT load_extension('mod_spatialite');");
int i = cmd.ExecuteNonQuery();

raises

System.Data.SQLite.SQLiteException : SQL logic error or missing database
not authorized

but I am able to successfully call the function in the SQLite CLI

Could someone point out where I'm going wrong with this syntax please

Thanks
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] System.Data.SQLite for Pocket PC & RTREE

2015-02-01 Thread Green Fields
 

Hi

 

I have investigated this problem further and it appears that RTree is
definitely enabled, most queries work fine, but a query to the index fails.

I have tried a straight query to the index

SELECT * FROM idxNetwork WHERE ROWID = 1, which fails crashing the app at
command.ExecuteReader() with no exception thrown

As does SELECT * FROM idxNetwork

 

A query to sqlite_master confirms that the index tables exist.

 

I realise that Windows Mobile 6 is not well supported any more, but can
anyone help with some insight of what may be causing this to occur on the
Mobile and not the desktop?

 

Thanks

 

Duncan 

 

 

From: Green Fields [mailto:defn...@gmail.com] 
Sent: Sunday, 18 January 2015 3:46 PM
To: 'sqlite-users@sqlite.org'
Subject: System.Data.SQLite for Pocket PC & RTREE

 

Hi

I hope this message doesn't double up but the last one did not appear to
make it.

 

I'm new to the list and newish to SQLite and would appreciate some tips.

I'm attempting to create an application that requires a spatial rtree query,
and this works extremely well using the x86 version of the
System.Data.SQLite library
(sqlite-netFx40-static-binary-bundle-Win32-2010-1.0.94.0.zip). However, when
I attempt to run the same query using
(sqlite-netFx35-binary-PocketPC-ARM-2008-1.0.94.0.zip) in a pocketPC port,
the app crashes, and I have been unable to get any feedback from the debug
because the connection to the device is broken. Standard SQL queries and
sqlite_version() work fine.

 

I'm pretty sure rtree would be enabled in the cf binary looking at the
source config, but I don't know of a way to check for this in the compiled
binary short of running an rtree query.

 

I am new to debugging on mobile devices so there may be a way to log the
error that I'm not aware of, but so far all attempts to trap the error have
failed.

 

Does anyone have any suggestions where the problem might lie?

 

Thanks for any help

 

Duncan

 

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] System.Data.SQLite for Pocket PC & RTREE

2015-01-17 Thread Green Fields
Hi

I hope this message doesn't double up but the last one did not appear to
make it.

 

I'm new to the list and newish to SQLite and would appreciate some tips.

I'm attempting to create an application that requires a spatial rtree query,
and this works extremely well using the x86 version of the
System.Data.SQLite library
(sqlite-netFx40-static-binary-bundle-Win32-2010-1.0.94.0.zip). However, when
I attempt to run the same query using
(sqlite-netFx35-binary-PocketPC-ARM-2008-1.0.94.0.zip) in a pocketPC port,
the app crashes, and I have been unable to get any feedback from the debug
because the connection to the device is broken. Standard SQL queries and
sqlite_version() work fine.

 

I'm pretty sure rtree would be enabled in the cf binary looking at the
source config, but I don't know of a way to check for this in the compiled
binary short of running an rtree query.

 

I am new to debugging on mobile devices so there may be a way to log the
error that I'm not aware of, but so far all attempts to trap the error have
failed.

 

Does anyone have any suggestions where the problem might lie?

 

Thanks for any help

 

Duncan

 

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] System.Data.SQLite for Pocket PC & RTREE

2015-01-15 Thread Green Fields
Hi

 

I'm new to the list and newish to SQLite and would appreciate some tips.

I'm attempting to create an application that requires a spatial rtree query,
and this works extremely well using the x86 version of the
System.Data.SQLite library
(sqlite-netFx40-static-binary-bundle-Win32-2010-1.0.94.0.zip). However, when
I attempt to run the same query using
(sqlite-netFx35-binary-PocketPC-ARM-2008-1.0.94.0.zip) in a pocketPC port,
the app crashes, and I have been unable to get any feedback from the debug
because the connection to the device is broken. Standard queries and
sqlite_version() work fine.

 

I'm pretty sure rtree would be enabled in the cf binary looking at the
source config, but I don't know of a way to check for this in the compiled
binary short of running an rtree query.

 

I am new to debugging on mobile devices so there may be a way to log the
error that I'm not aware of, but so far all attempts to trap the error have
failed.

 

Does anyone have any suggestions where the problem might lie?

 

Thanks for any help

 

Duncan

 

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users