Created
January 26, 2011 14:40
-
-
Save sixman9/796766 to your computer and use it in GitHub Desktop.
How to load libspatialite under C#
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//'using' System.Data.SQLite; | |
using (DbConnection connection = new SQLiteConnection("Data Source=" + database)) { | |
connection.Open(); // load the extension | |
using (DbCommand command = connection.CreateCommand()) { | |
//Load the libspatialite library extension - *.dll on windows, *.a on iOS | |
command.CommandText = "SELECT load_extension('libspatialite-2.dll');"; | |
command.ExecuteNonQuery(); // Run queries here | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment