3 Replies Latest reply on Jun 7, 2013 9:46 PM by user8997135


      I want to do this:
      1,if the key exists, overwrite
      2,if the key doesn't exist, no op, return operationstatus.keyexist

      My lame understanding of transaction did not give me a definite answer. And the existance of putNoOverwrite made me wonder if there is something subtle going on.
        • 1. Re: putOverwrite?
          Bogdan Coman-Oracle
          It's not clear to me what question is, as you talked about overwriting existing records and transactions... and I don't see the connection. Do you want to do 'putOverwrite' using a single database operation? Or do you ask about enclosing the two operations (locating the key and inserting if it's there) in the same transaction?
          • 2. Re: putOverwrite?
            I think he's asking how to do an update or "putNoInsert", and the answer if that you have to use a cursor:
            1. Cursor.getSearchKey -- if NOTFOUND, stop.
            2. Cursor.putCurrent.
            • 3. Re: putOverwrite?
              Yes,that's what I want.