You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I am developing a cordova app for android working with spatial data. For processing spatial data I am trying to use cordova-spatialite-storage plugin. Following plugin's
documentation, first of all, I added plugin to my project, then placed my Db.sqlite in my device (file:///storage/emulated/0/Download/DB.sqlite). at last, I executed a simple query as follows:
query = 'SELECT Geometry FROM myTable LIMIT ?';
var args = [20];
var querySuccess = function(results) { } var queryError = function(error) {
alert(error)
}
var spatialiteURI = "file:///storage/emulated/0/Download/DB.sqlite";
var db = window.sqlitePlugin.openDatabase({name: spatialiteURI}); db.transaction(function(tx) { tx.executeSql(query, args, querySuccess, queryError); })
But the only thing I've got is alert(error) in queryError function (please see attached picture).
It's worth mentioning, I am using Framework7 as javascript framwork in my project.
Can you please help me what's wrong with my code?Thank you for any help you can offer.
The text was updated successfully, but these errors were encountered:
thanks!
I am using cordova-spatialite-storage version 2.0.0 (the latest version) but the plugin can't find my database file.
I think there is something wrong with database name I am using in my code as follows:
var spatialiteURI = "file:///storage/emulated/0/Documents/DB.sqlite";
var db = window.sqlitePlugin.openDatabase({ name: spatialiteURI });
In addition, In case I use a name like "DB.sqlite" the plugin will create a new database.
Is my way of defining database name option wrong ?Or is there another way to do this?
It is so critical for me to process spatial data in my app. So any help make this plugin work is so appreciated.
Thanks in advance.
Hi,
I am developing a cordova app for android working with spatial data. For processing spatial data I am trying to use cordova-spatialite-storage plugin. Following plugin's
documentation, first of all, I added plugin to my project, then placed my Db.sqlite in my device (file:///storage/emulated/0/Download/DB.sqlite). at last, I executed a simple query as follows:
query = 'SELECT Geometry FROM myTable LIMIT ?';
var args = [20];
var querySuccess = function(results) { } var queryError = function(error) {
alert(error)
}
var spatialiteURI = "file:///storage/emulated/0/Download/DB.sqlite";
var db = window.sqlitePlugin.openDatabase({name: spatialiteURI}); db.transaction(function(tx) { tx.executeSql(query, args, querySuccess, queryError); })
But the only thing I've got is alert(error) in queryError function (please see attached picture).
It's worth mentioning, I am using Framework7 as javascript framwork in my project.
Can you please help me what's wrong with my code?Thank you for any help you can offer.
The text was updated successfully, but these errors were encountered: