3 Replies Latest reply on Nov 29, 2013 8:59 AM by juliojgs

    oracle form query only!

    c473ab44-51dd-4824-9415-b64c81420107

      hi

       

      im using oracle forms 6i

       

      i have two database item on my form .. one of them is for user_name (Textitem) ..

       

      i want from this form is just query records from database... no insertion and no update or change .. and also no delete

       

      i go to property palette of item user_name and change the (insert allowed) and (update allowed) to 'NO'

       

      then when i run the form and click on the user name field to query it reject and show me this message :

       

      FRM-40200: Field is protected against update

        • 1. Re: oracle form query only!
          VJ001K

          Hi,

           

            For user_name change the property of inset_allowed and update_allowed to YES and on when_new_form_instance trigger write execute_query(no_validate).

            As you made this block as a database block so it will execute properly.

          • 2. Re: oracle form query only!
            Priyasagi

            Simple.


            Go to property palette of item user_name:

            Enabled: No.

            Querey Allowed: Yes.


            No other changes needed.

            • 3. Re: oracle form query only!
              juliojgs

              FRM-40200 raises when you try to write data in a text item when it is not allowed. Mouse navigation by itself shouldn't raise this error. Make sure that items are empty and that there is no trigger assigning values (for example a When-New-Item-instance trigger) when you click on the item.

               

              Also, if you want no dml in this form, you can do several things:

              At runtime, when you enter the form, it is in NORMAL mode (look up system.mode property in the online help) and the record is in NEW status (lookup status). If this is a query only form, you shouldn't stay in that mode/status, as it is useless. You can put the form in enter_query mode (if you want to filter data), or execute the query directly and stay in NORMAL mode / QUERY status. This operations can be programmed in the When-New-Form-Instance trigger.

               

              At design time, set the block insert allowed, update allowed, delete allowed properties to NO, at block level!

               

              At runtime: You even can call your form with query_only parameter (but this has more implications you should be aware of).