0

在我的 Firefox 扩展中,我正在尝试进行更新声明,但我得到了这个错误

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

插入/选择语句工作正常,但更新和删除不起作用。

代码:

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 
...
4

1 回答 1

0

好的,我想通了。重新启动后,它开始像它必须的那样工作。

于 2013-02-04T11:19:32.277 回答