Search results

  1. J

    Code execution paused because of record lock in trigger

    Thank you all. I rewrote the code in lowercase, not abbreviating and removing the "FIRST" in "FIND" statement. All these tips helps me a lot. I'll do some tests, but as always, this was really helpful.
  2. J

    Code execution paused because of record lock in trigger

    Sorry for the delay in the response. I was doing some tests and research. That trigger needs refactoring indeed. Besides that, here's what I come up with based on the STOP-AFTER code snippet suggested. define variable allDone as logical initial false no-undo. define buffer customer for...
  3. J

    Code execution paused because of record lock in trigger

    Working with transactions, I found the following problem / imagined scenario. A record needs to be updated and for that I used strong scope, transaction and proper lock, like so: def buffer customer for customer. do for customer trans. find customer exclusive-lock where...
  4. J

    Sql Query Union with uneven columns

    Try single-quotes for the field value since you are using double-quote for the field alias, as such: '' as "exit_date", '' as "school_year" and so on. Maybe it will work.
  5. J

    Right approach when using transactions and strong scope to conditional update

    Sorry for the type. Since I am doing a NO-LOCK find, other session could still do a EXCLUSIVE-LOCK find and get the record LOCK and then update the record. There's a very little chance indeed of the record change but I wanted to be sure and the FIND CURRENT is to see if the record data...
  6. J

    Right approach when using transactions and strong scope to conditional update

    Cool, thanks very much to the both of you for the support and tips! It's hard to the find specifics online, but this was very helpful!
  7. J

    Right approach when using transactions and strong scope to conditional update

    It worked! Rereading the documentation, using a character variable it showed me the changed field. Using a logical variable it returns TRUE when nothing has changed and FALSE when any field has changed (for me this is kind of counterintuitive, but now I got it). Thx a lot for the help and...
  8. J

    Right approach when using transactions and strong scope to conditional update

    Exactly what I would like. Before posting this question I searched and tested it on "BUFFER-COMPARE source TO target", but I couldn't figure out how to create an example that would work. From what I've read this function only compares the field types and not the field values. Here's what I...
  9. J

    Right approach when using transactions and strong scope to conditional update

    Imagine the following scenario: I have a client who only needs to be updated if they meet certain criteria based on their own data. I can only update the record if it meets the criteria (so I only lock the record after the IF statements, when necessary) and the data I was based on cannot have...
Top