SQLITE + CHROME/SAFARI: "not authorized" ERROR
I am trying to do a bulk transaction using SQLITE on CHROME (and SAFARI).
I'm doing this with javascript so this is what I have开发者_Go百科:
=============================================================
query = "BEGIN TRANSACTION; "
query += "INSERT INTO schools (name) VALUES('School 1');"
query += "COMMIT TRANSACTION;"
db.executeSql(query);
=============================================================
When I run this I get an error: NOT AUTHORIZED.
This only happens when I use the "BEGIN" or "BEGIN TRANSACTION" or "COMMIT" or "END TRANSACTION" keywords.
I've searched the web and the only thing that I can come up with so far is that the "NOT AUTHORIZED" error message means this functionality is not supported.
Does anyone know more about this?
Thanks,
Nik
Indeed, you don't need the BEGIN TRANSACTION, COMMIT and END keywords in your SQL queries.
I also have this error "not authorized (Code 1)" when I test my code with Safari in private browsing mode (menu Safari->Private Browsing). When turn off, it works perfectly.
DaveOnCode also saw this behavior
精彩评论