I'm trying update my indexedDB records but I get this error
DataError: Data provided to an operation does not meet requirements. Source File
I already tried this but don't worked
This is my function:
function updNotes(text, timestamp, blob)
{
var obj = {text: text, timestamp: timestamp};
if (typeof blob != 'undefined')
obj.image = blob;
store = getObjectStore("notes", 'readwrite');
objKeyRange = IDBKeyRange.only(+objtoedit);
req = store.openCursor(objKeyRange);
req.onsuccess = function(evt){
var cursor = evt.target.result;
console.log(cursor.key);
//do the update
var objRequest = cursor.update(obj);
objRequest.onsuccess = function(ev){
console.log('Success');
};
objRequest.onerror = function(ev){
console.log('Error');
};
};
req.onerror = function(evt){
console.log('Error');
};
Anyone can help me to fix this ?
Best regards