Firefox Extension SQLite - Update/Delete query

0

In my firefox extension I'm trying to make an Update statement, but I've getting back this error

Error: Component returned failure code: 0x80630001 (NS_ERROR_STORAGE_BUSY) [mozIStorageConnection.executeSimpleSQL]

Insert/Select statements works fine, but Update and Delete are not working.

Code:

Components.utils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/FileUtils.jsm");
...
this.dbFile = FileUtils.getFile("ProfD", [Source.globalValue.DB_NAME+".sqlite"]);
this.db = Services.storage.openDatabase(this.dbFile);
...
/* #1 */
var statement = this.db.createStatement('UPDATE articles SET isRead="true" WHERE id= :row_id');
statement.params.row_id = 6643098;
statement.executeAsync(); //no errors. Nothing happening - only CPU 100% Load
//statement.execute();  //getting that  error 

/* #2 */
this.db.executeSimpleSQL('UPDATE articles SET isRead="true" WHERE id=6643098'); //getting that  error 
...
javascript
sqlite
firefox-addon
asked on Stack Overflow Feb 3, 2013 by flienteen • edited Feb 3, 2013 by flienteen

1 Answer

0

Ok, i figured it out. After reboot it started working like it has to.

answered on Stack Overflow Feb 4, 2013 by flienteen

User contributions licensed under CC BY-SA 3.0