0
我有一個名爲mydb.db的sqlite3數據庫。它是一個外部文件。是否有可能在javascript中打開這個數據庫?在Javascript中打開外部sqlite3數據庫
我試過下面的代碼,但是這導致mydb.db在chrome創建它的數據庫的地方創建,所以它顯然不是從文件加載我的。
try {
if (!window.openDatabase) {
alert('Databases are not supported in this browser.');
} else {
var Name = 'mydb.db';
var version = '1.0'; //1.0
var displayName = 'TEST';
var maxSize = 100000; // bytes
database = openDatabase(Name, version, displayName, maxSize);
}
} catch(e) {
...
}
謝謝, Ĵ
http://stackoverflow.com/questions/6041083/sqlite-database-location-via-javascript-in-the-context-of-chrome-browser – 2012-08-03 04:41:01