Having trouble with SQL Dataserver and buffer updates via the progress triggers.

okion

New Member
Hi there,
Does anyone knows how progress handles buffers updates via the progress triggers when there is a SQL dataserver?
Progress is sometimes confused when buffer updates are done via the trigger for different tables.
When I update the trigger buffer and also another buffer and release that other buffer the old buffer value is not the old value anymore:(
IE:
Initial situation:
Table Order:
Order.cdstatus = 'O':U.
Order.cdproces = '':U.
Table OrderLine
OrderLine.cdstatus = 'B':U.
OrderLine.cdproces = '':U.
Now we run the following code:
ASSIGN OrderLine.cdstatus = 'O':U.
RELEASE OrderLine.
The releases calls the OrderLine trigger:
There we do:
assign OrderLine.cdstatus = caps(OrderLine.cdstatus).

/* B -> O */
IF OrderLine.cdstatus <> o-OrderLine.cdstatus THEN DO:
FIND order ... EXCLUSIVE-LOCK NO_ERROR.
IF AVALAIBLE order THEN DO:
ASSIGN Order.cdstatus = ?
Order.cdproces = "XXXX"
.
RELEASE Order NO-error.
END.
END.

In the Order trigger i put a message:
MESSAGE 'TRIG Order BEGIN o-Order.cdstatus ' o-Order.cdstatus ' Order.cdstatus ' Order.cdstatus.
Now we get the message:
o-Order.cdstatus = ?
I should expect that the old value should be 'O'.
The weird part is that when I remove the
assign OrderLine.cdstatus = caps(OrderLine.cdstatus).
line it works fine.
An solution is also when I re-order the assignment of the order fields.
ASSIGN Order.cdproces = "XXXX"
Order.cdstatus = ?
.
I did not expect that an assign of the trigger buffer(OrderLine) can influence another table buffer (Order).
Does anyone knows what the reason is of this behavior.
We are working on 10.2b
 
Top