Hi, I need to help. I first time to develop phonegap.
I try to read data from sqlite but emulator show error
" ERROR: a statement with no error hanlder failed: prepare statement failed with error:1 " and ERROR_CODE = 0
Description:
I put database file in to www.
I use cordova Cli to develop this app.
npm version 2.5.1
node version 0.12.0
phonegap version 5.3.1
io.litehelpers.cordova.sqlite 0.7.10 "Cordova sqlite storage plugin"
Hi, I need to help. I first time to develop phonegap. I try to read data from sqlite but emulator show error " ERROR: a statement with no error hanlder failed: prepare statement failed with error:1 " and ERROR_CODE = 0
Description: I put database file in to www. I use cordova Cli to develop this app.
npm version 2.5.1 node version 0.12.0 phonegap version 5.3.1 io.litehelpers.cordova.sqlite 0.7.10 "Cordova sqlite storage plugin"
var app = { initialize: function() { this.bindEvents(); }, bindEvents: function() { document.addEventListener('deviceready', this.onDeviceReady, false); }, onDeviceReady: function() { app.receivedEvent('deviceready'); }, receivedEvent: function(id) { window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, app.onFileSystemSuccess, app.onFileSystemError); }, onFileSystemSuccess: function(fileSystem) { console.log('File system name: ' + fileSystem.name); app.checkGISDB(); }, onFileSystemError: function(event) { console.log('Failed to initialze file system'); }, checkGISDB: function() { console.log('CheckGISDB'); var dbgrowth = window.sqlitePlugin.openDatabase({ name: "farm.db" });
};
app.initialize();