This content has been marked as final. Show 1 reply
However, if the key already exist it does not overwrite the data, I just get a lock error.A lock error (please always send the stack trace whenever you report an error!) doesn't mean that the record already exists or that you're using the wrong method, it means that another thread or transaction holds a lock on that record. Be sure to read:
And be sure to close your transactions and cursors, or they will hold locks forever.