Google Gears - Database - VACUUM

With this code:

var db = google.gears.factory.create('beta.database');
db.open('cominar');
db.execute('CREATE TABLE IF NOT EXISTS Ajax (AJAX_ID INTEGER PRIMARY KEY AUTOINCREMENT , MODULE TEXT, FUNCTION TEXT, CONTENT_JSON TEXT);');
db.execute('VACUUM;'); // nettoye la DB

      

I am trying to clear the database (VACUUM) on every initialization, but I get this error:

Fault Error: Database operation failed. ERROR: permission denied DETAILS: not authorized

The database was created by me (on the same page).

Thanks!

+2


a source to share


1 answer


I think this is not allowed, which is why the Gears team did not allow users to use this Sqlite feature. Not all operations are allowed with JavaScript. For example, attaching a database can be dangerous, so it is not allowed.



+1


a source







All Articles