What is the meaning of this error message "insertId: Error: INVALID_ACCESS_ERR: DOM Exception 15"?

I am developing an application using jquery mobile, phonegap and openDatabase. When the application is completed, I can see in the Safari browser console SQLResultSet with this message:

insertId: Error: INVALID_ACCESS_ERR: DOM Exception 15. 

However, my application is working fine. But I do not understand why this message is shown.

Please help me.

+8
jquery mobile-safari cordova
source share
3 answers

This means that no row was inserted by the transaction, so it has more information than an error.

If the INSERT statement was not successful or the transaction was not INSERT at all, the insertId property for the result set contains this message instead of the identifier of the last row inserted.

http://docs.phonegap.com/phonegap_storage_storage.md.html#SQLResultSet

+4
source share

I had it and it drove me crazy.

What happens if the operation is not an INSERT statement, insertId is discarded since no row was inserted, but instead of just showing 0, it gives a cryptic DOM error.

You just need to ignore it and focus on the lines.

The big question is: why the hell is this first, why not just create sqlInsertResultSet and sqlRetrieveResultSet and stop interfering in our minds :(

+7
source share

For my part, the following error was indicated after this:

 results.rows[0].x 

and it worked:

 results.rows.item(0).x 
+4
source share

Source: https://habr.com/ru/post/650636/


All Articles