- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm getting grief from the cordova-sqlite-storage plugin within the XDK simulator. Whenever I try to execute a transaction, I get the following error in the console:
"Uncaught TypeError: Cannot read property 'type' of undefined" SQLitePlugin.js:452
Here is my code:
function onDeviceReady() { document.addEventListener('deviceready', createSQLDB, false); } function createSQLDB() { var db = null; db = window.sqlitePlugin.openDatabase({name: 'database.db', location: 'default'}); setTimeout(function() { db.transaction(function(transaction) { transaction.executeSql('CREATE TABLE IF NOT EXISTS settings (id integer primary key, option1 text, option2 text)', [], function(tx, result) { alert("Table created successfully"); }, function(error) { alert("Error occurred while creating the table."); }); }); }, 1000); }
Is there something obvious I've missed or is this the simulator failing to support the plugin, please? Any help would be greatly appreciated!
Cheers
Andy
- Tags:
- HTML5
- Intel® XDK
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The simulate tab does not simulate that plugin. See these two doc pages:
- https://software.intel.com/en-us/xdk/docs/intel-xdk-simulator
- https://software.intel.com/en-us/xdk/docs/intel-xdk-simulator-limitations
Especially the second-half of the second doc...

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page