When I used the following line, I got the error like:
I am using :
Any ideas about it? Thanks a lot.
These is a W3C Indexed Database API, it's state is draft.
Your code can't work in normal html app, it's not a Win8 UI problem.
Please refer to this :
This method throws a
DOMExceptionof type ReadOnlyError if the transaction which this IDBObjectStore belongs to is has its mode set to
"readonly". If any of the following conditions are true, this method throws a
DOMExceptionof type DataError:
- The object store uses in-line keys and the <var>key</var> parameter was provided.
- The object store uses out-of-line keys and has no key generator and the <var>key</var> parameter was not provided.
- The object store uses in-line keys and the result of evaluating the object store's key path yields a value and that value is not a valid key.
- The object store uses in-line keys but no key generator and the result of evaluating the object store's key path does not yield a value.
- The <var>key</var> parameter was provided but does not contain a valid key.
Otherwise this method creates a structured clone of the <var>value</var> parameter. If the structure clone algorithm throws an exception, that exception is rethrown. Otherwise, run the steps for asynchronously executing a request and return the
IDBRequestcreated by these steps. The steps are run with this
IDBObjectStoreas <var>source</var> and the steps for storing a record into an object store as <var>operation</var>, using this
IDBObjectStoreas <var>store</var>, the created clone as <var>value</var>, the <var>key</var> parameter as <var>key</var>, and with the <var>no-overwrite flag</var> flag set to true.
Parameter Type Nullable Optional Description value
✘ ✘ The value to be stored in the record key
✘ ✔ The key used to identify the record Exception Description DOMException
The transaction this
IDBObjectStorebelongs to is not active.
The mode of the associated transaction is
The calculated key for the insertion was not a valid key. Also thrown if the calculated key for any of the indexes which belong to this object store had a calculated key which was not a valid key
Occurs if a request is made on a source object that has been deleted or removed.
The data being stored could not be cloned by the internal structured cloning algorithm.Return type:
- Marked as answer by Dino HeModerator Friday, August 31, 2012 6:52 AM