title: Check if record already exists when doing a buffer-copy
body: <p>I have a piece of code which does a Buffer-Copy method, but is there any way to check before doing the buffer copy of the record already exists? <strong>I do not want to check 'unique keys' in my data dictionary.</strong></p>
  
  <p>This is the code I have at this moment: </p>
  
  <pre><code>    CREATE QUERY hQuery.
      hQuery:SET-BUFFERS(hBuffer).
      hQuery:QUERY-PREPARE("FOR EACH " + hBuffer:NAME + " NO-LOCK ").  
      hQuery:QUERY-OPEN().
  
  
      hQuery:GET-FIRST().
      DO WHILE NOT hQuery:QUERY-OFF-END:
          DO TRANSACTION ON ERROR UNDO:
  
              hDBBuffer:BUFFER-CREATE().
              hDBBuffer:BUFFER-COPY(hBuffer) NO-ERROR.   
  </code></pre>