Write trigger help

skunal

Member
I am writing the write trigger on pod_det where pod_line and pod_part are the fields. When i am writing to pod_line = 2 I want to get the records of pod_line = 1 and do some validation's. But when i use find first in the write trigger for pod_det table i get the cursor error. Can anyone help me on this how to do this on write trigger
 
Not sure if I understand what you are trying to do. But I think you are trying to user the default record buffer to fetch two records at the same time - which is not possible. If that's the case then you need to use a defined buffer to fetch a different record from the same table.

In order to give you a better advise you should post your code.

Heavy Regards, RealHeavyDude.
 
the syntax you're after, if RHD is right, is:

define buffer lb-pod_det for pod_det.
 
Thanks for reply .

1. Progress version is 10.1c
2. Unix
3. We are trying to find the find first record where pod_line = 1 when we are writing the record for the pod_line = 2 in the WRITE trigger of pod_det.
4. Cannot change cursor of the pod_det when executing the trigger --- Is the error we are getting.
Even when we tried with the buffer its not working
Code:
 [TABLE]
TRIGGER PROCEDURE FOR WRITE OF POD_DET OLD BUFFER OLD_POD_DET.
  for first pod_det where pod_det.pod_line = 1 no-lock :
   end.
[/TABLE]
 
TRIGGER PROCEDURE FOR WRITE OF POD_DET OLD BUFFER OLD_POD_DET.
for first pod_det where pod_det.pod_line = 1 no-lock:
end.
 
TRIGGER PROCEDURE FOR WRITE OF POD_DET OLD BUFFER OLD_POD_DET.
{mfdeclre.i }
for first pod_det where pod_det.pod_line = 1 no-lock :
end.
 
Did you actually try with the named buffer?

Code:
TRIGGER PROCEDURE FOR WRITE OF POD_DET OLD BUFFER OLD_POD_DET.
    {mfdeclre.i }

define buffer lb-pod_det for pod_det.

for first lb-pod_det where lb-pod_det.pod_line = 1 no-lock :
end.
 
Back
Top