Is there an issue in progress 11.5 to use prompt for and upd

Posted by Ezaz War on 02-Dec-2015 06:30


Please help on below:-

We are getting this error->  "XXX has NO-LOCK status, update to field not allowed. (396)

** Unable to update XXX. (142)"

In my application program, Multiple update statements are running in a block and we fetched table using "Exclusive-lock" but during execution of application on each update statement throwing above given error

Is there any issue in progress 11.5 to use prompt-for and update statement . Please Suggest.


All Replies

Posted by James Palmer on 02-Dec-2015 06:58

Hi Ezaz. A sample of the code would be really helpful in assisting you with this. Can you recreate it with a simple example?

Posted by Ezaz War on 02-Dec-2015 07:22

This is the block where we are updating the records in the database

and we are getting above error

on "c", "C" of br-lead-dist in frame f-lead-dist


message "inside" view-as alert-box.

   vr-recid = recid(lead-dist).

   find lead-dist exclusive-lock

       where recid(lead-dist) = vr-recid.

       message transaction view-as alert-box.



         + " "

         + vc-vendor-name

           @ vc-vendor-display  format "x(20)"




     with frame  f-change.



        with frame f-change.


          message "prompt---bfr" "vr-recid" vr-recid skip "avail" available(lead-dist) skip locked(lead-dist) view-as alert-box.

   if can-find(b-lead-dist no-lock

                 where b-lead-dist.dist-no = lead-dist.dist-no

                   and b-lead-dist.vend-addr-bk-no =


                   and b-lead-dist.effective-date =

                       input lead-dist.effective-date

                   and recid(b-lead-dist) <> vr-recid)

   then do:

       message color update

           "Record already exists for the dist/vendor/date entered"

            view-as alert-box information.

       undo, retry.


   message "Locked : " locked(lead-dist) view-as alert-box.

   assign lead-dist.effective-date = 01/01/2009  /*input lead-dist.effective-date*/ .

             message "Date : " lead-dist.effective-date view-as alert-box.

   vc-region = "Not Found".

   find dist where dist.dist-no = lead-dist.dist-no no-lock no-error.

   if available dist then


      find region where region.reg-no = dist.reg-no no-lock no-error.

      if available region then

         vc-region = region.reg-name.


   display vc-region with frame f-change.

   vd-prior-value = lead-dist.prem-gross-rate.





       with frame f-change.

       message "-------------------1-------------------------------" view-as alert-box.

   if vd-prior-value <> lead-dist.prem-gross-rate then

      lead-dist.prem-lead-rate = round(lead-dist.prem-gross-rate / .53, 4).

   vd-prior-value = lead-dist.mkt-gross-rate.




       with frame f-change.

   if vd-prior-value <> lead-dist.mkt-gross-rate then

      lead-dist.mkt-lead-rate = round(lead-dist.mkt-gross-rate / .53, 4).

   vd-prior-value = lead-dist.gross-price.







       with frame f-change.

   if vd-prior-value <> lead-dist.gross-price then

      lead-dist.lead-price = round(lead-dist.gross-price / .53, 4).






       with frame f-change.

   hide frame f-change.

   run ip-open-query.


PROCEDURE ip-open-query.

   frame f-lead-dist:title =

    if not vl-current-only

    then " DISTRIBUTOR LEAD FILE - All Records Fitting Qualify Criteria "

    else " DISTRIBUTOR LEAD FILE - Currently Active Fitting Qualify Criteria ".

   open query q-lead-dist

       for each lead-dist no-lock.

enable all with frame f-lead-dist.


Posted by ske on 04-Dec-2015 06:10

> We are getting this error->

> "XXX has NO-LOCK status, update to field not allowed. (396)

> ** Unable to update XXX. (142)"

Which buffer name is shown for "XXX"?

Might you have some assignment with an unqualified field name that resolves to another no-locked buffer for the same table? Or a duplicate variable name that actually resolves to a field name? "Unable to update" can refer to assignments too, not just UPDATE or PROMPT-FOR.

Posted by Ezaz War on 04-Dec-2015 07:05

i have replaced actual label with xxx

Posted by ske on 04-Dec-2015 10:10

Yes, I see that. But what is the actual label? It is difficult to match the error messages to the code you posted without the label...

Posted by Ezaz War on 07-Dec-2015 00:55

its just a label declared for the database field that is outputted as lead ditribution

Posted by ske on 07-Dec-2015 03:04

Ok, forget the label, but which table or buffer does it refer to?

This thread is closed