does cursor.putCurrent work? -
11-09-2005
, 06:48 PM
Hi,
I have a table with sorted duplicates. I would like to be able to
overwrite an existing record without having to first delete it and then
add it again. A plain:
db.put(null, key, value)
does nothing and complains that "Duplicate data items are not supported
with sorted data". Makes sense, but then I tried:
cursor = db.openCursor(null, null);
if (cursor.getSearchBoth(key, value, LockMode.DEFAULT) ==
OperationStatus.SUCCESS)
cursor.putCurrent(value);
else
db.put(null, key, value);
now there is no error, but the record does NOT get overwritten. Any
idea?
Thanks
Boris |