- Home /
Spatialite under Unity
So I need to write a Unityapp for Android which can visualise Polygones out of an Spatialite Database. I can get all Sqlite Queries to work, but since i need the spatialite extension i run into a problem. If i try the following :
using Mono.Data.Sqlite; private string connection; private IDbConnection dbcon; private IDbCommand dbcmd;
dbcon = new SqliteConnection(connection);
dbcmd = dbcon.CreateCommand(); dbcmd.CommandText = "SELECT load_extension('libspatialite-2.dll');";
reader = dbcmd.ExecuteReader();
I get following error :
SqliteException: SQLite error not authorized Mono.Data.Sqlite.SQLite3.Reset (Mono.Data.Sqlite.SqliteStatement stmt) Mono.Data.Sqlite.SQLite3.Step (Mono.Data.Sqlite.SqliteStatement stmt) Mono.Data.Sqlite.SqliteDataReader.NextResult () (wrapper remoting-invoke-with-check) Mono.Data.Sqlite.SqliteDataReader:NextResult () Mono.Data.Sqlite.SqliteDataReader..ctor (Mono.Data.Sqlite.SqliteCommand cmd, CommandBehavior behave) (wrapper remoting-invoke-with-check) Mono.Data.Sqlite.SqliteDataReader:.ctor (Mono.Data.Sqlite.SqliteCommand,System.Data.CommandBehavior) Mono.Data.Sqlite.SqliteCommand.ExecuteReader (CommandBehavior behavior) Mono.Data.Sqlite.SqliteCommand.ExecuteDbDataReader (CommandBehavior behavior) System.Data.Common.DbCommand.ExecuteReader () System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader ()
I can't find a solution and I am getting really concerned right about now.
Hey @scylor have you found a solution to your problem? I'm running into the same kind of problem.
Your answer
Follow this Question
Related Questions
SQLite3 AttachDatabase command won't work 0 Answers
Game Database. SQLite, XML, JSON or PlayerPrefs? 1 Answer
Can you interrupt a SQLite command? How? 1 Answer
Sqlite in Unity 0 Answers
Return List from Singleton 1 Answer