update method

Updates a value in the current record of the cursor.


var retVal = IDBCursor.update(value);


value [in]

Type: any

Return value

Type: IDBRequest

An object representing the update request.


This method can throw the following DOMException exceptions:

Note  As of a Windows Store app using JavaScript, the code property is deprecated in favor of the name property, which is preferred for standards compliance and future compatibility.
Exception propertiesCondition
name: DataError

When an object store uses inline keys, this exception indicates that the key value of the update object does not match the key value of the corresponding record in the object store.

name: InvalidStateError
code: DOMException.INVALID_STATE_ERR (11)

The update is not allowed for one of the following reasons:

  • the cursor was created using openKeyCursor.
  • the cursor is iterating to a new record.
  • the cursor has moved past the last record.
name: TransactionInactiveError

The associated transaction has closed or is not active.

name: ReadOnlyError

The associated transaction is read-only.

name: DataCloneError
code: DOMException.DATA_CLONE_ERR (25)

The data could not be copied.


Standards information

See also




© 2016 Microsoft