E
ezequielmontoya
Guest
Thanks everyone! It's not a FOR EACH, it is a FIND. It's an "optimistic" lock, I guess. The following code is where the error occurs. It's the RETURN trigger for a fill-in named "Barra": DO: DEFINE VARIABLE rFila AS ROWID NO-UNDO. IF VALID-EVENT(FOCUS, "VALUE-CHANGED") THEN DO: ASSIGN Barra. FIND InvTarjeta WHERE invtarjeta.periodo = giperiodo AND invtarjeta.perinv = giperinv AND InvTarjeta.NroTarj = Barra SHARE-LOCK NO-ERROR. IF AVAILABLE invtarjeta THEN DO: ASSIGN InvTarjeta.FlgBarrido = YES InvTarjeta.InvPeso = InvTarjeta.SdoNeto InvTarjeta.InvNroMet = InvTarjeta.NroMet. rFila = ROWID(InvTarjeta). FIND CURRENT invtarjeta NO-LOCK NO-ERROR. qhInvTarjeta:REPOSITION-TO-ROWID(rFila). END. ELSE DO: /* Other stuff */ END. FIND CURRENT InvTarjeta NO-LOCK NO-ERROR. Barra:SCREEN-VALUE = "". APPLY "ENTRY" TO Barra. RETURN NO-APPLY. END. The table with the problem is "InvTarjeta". "rFila" is used to reposition the cursor on a browse. The program is used simultaneously for only two users. The value in "Barra" is entered by barcode scanners, both in different areas, scanning different items. They can´t take the same record, and still they receive the message.
Continue reading...
Continue reading...