Form based on a VIEW

hi I have a form based on multiple views
when try to query the data in this form
I get this error
An unexpected error occurred: ORA-01445: cannot select ROWID from a join view without a key-preserved table (WWV-16016)
An unexpected error occurred: ORA-01445: cannot select ROWID from a join view without a key-preserved table (WWV-16016)
null

Right now you will be able to base a portal form only on updatable views. Non updatable views are not supported.
As a work around you can use QBE reports to query the data, without having the delete and update links.
Regards,
Sunil.
null

Similar Messages

  • Oracle form based on a view - need to return a value after database trigger

    We have a form based on a view calling database trigger to insert data.
    I need to display a message of the record ID inserted on the form.
    The values to be displayed are ID field.

    Hi,
    if you use process of Automatic Row Processing (DML), you have an option *"Return Key Into Item"*.
    This will return your primary key into item, and then you can display this item as a result.
    Regards,
    Aljaz

  • Problem in tabular form based on dynamic view and pagination

    Hi All,
    I have a manual tabular form based on a dynamic view. The view fetches the records based on search criteria given by the user in all cases. But this view fetches ALL records when user clicks on pagination, without considering the search criteria. This is the problem I am facing.
    I am doing the following:
    Since tabular form does not support pl/sql function returning query, I cannot use a table directly. I need my results based on search criteria selected by user. Hence I created a dynamic view and used a "INSTEAD OF UPDATE" trigger to update the table.
    I use a set bind variables procedure, on load before header for setting the variables.
    This view fetches the correct data based on user search always. It creates a problem only in one situation, when using pagination in the report.
    The example can be found at:
    http://apex.oracle.com/pls/otn/f?p=19399:1:
    username = [email protected]
    pwd = kishore
    Here if "manager name" is entered as test, we get 5 records in "Summary of requests" report and 5 records in "Inactive Requests" report. When user clicks on Pagination in any of the reports, ALL the 7 records get fetched in "Summary of Requests" and 6 records in "Inactive Requests". How can I overcome this problem?? The report must consider the search variables even when pagination occurs.
    Is this because, the inbuilt "html_PPR_Report_Page" executes the region query once again by considering all search variables as NULL?
    Backend Code is at:
    http://apex.oracle.com/pls/otn/
    workspace: sekhar.nooney
    Username :[email protected]
    pwd: kishore
    application id = 19399
    My region code is something like:
    select *
    from regadm_request_v
    where access_type = :F110_REGADM
    and status <> 'INACTIVE'
    order by request_id
    My view code is:
    CREATE OR REPLACE VIEW REGADM_REQUEST_V
    AS
    SELECT *
    FROM REGREGOWNER.REGADM_REQUEST
    WHERE upper(employee_name) LIKE '%'||nvl(upper(REGADM_REQUEST_PKG.GET_EMPLOYEE_NAME),'%')||'%'
    AND upper(manager_name) LIKE '%'||nvl(upper(REGADM_REQUEST_PKG.GET_MANAGER_NAME),'%')||'%'
    AND upper(employee_sunetid) LIKE '%'||nvl(upper(REGADM_REQUEST_PKG.GET_EMPLOYEE_SUNET_ID),'%')||'%'
    AND upper(manager_sunetid) LIKE '%'||nvl(upper(REGADM_REQUEST_PKG.GET_MANAGER_SUNET_ID),'%')||'%'
    AND upper(request_date) LIKE '%'||nvl(upper(REGADM_REQUEST_PKG.GET_REQUEST_DATE),'%')||'%'
    AND upper(USAGE_AGREEMENT_RECVD) LIKE '%'||nvl(upper(DECODE(REGADM_REQUEST_PKG.GET_USAGE_AGREMNT_RECVD,'~!@',NULL,REGADM_REQUEST_PKG.GET_USAGE_AGREMNT_RECVD)),'%')||'%'
    AND upper(STATUS) LIKE '%'||nvl(upper(DECODE(REGADM_REQUEST_PKG.GET_STATUS,'~!@',NULL,REGADM_REQUEST_PKG.GET_STATUS)),'%')||'%'
    AND upper(REQUEST_APPROVED) LIKE '%'||nvl(upper(DECODE(REGADM_REQUEST_PKG.GET_REQUEST_APPROVED,'~!@',NULL,REGADM_REQUEST_PKG.GET_REQUEST_APPROVED)),'%')||'%'
    AND upper(nvl(APPROVAL_DATE,sysdate)) LIKE '%'||nvl(upper(REGADM_REQUEST_PKG.GET_APPROVED_DATE),'%')||'%'
    AND upper(APRVL_REQUEST_SENT) LIKE '%'||nvl(upper(DECODE(REGADM_REQUEST_PKG.GET_EMAIL_APPROVERS,'~!@',NULL,REGADM_REQUEST_PKG.GET_EMAIL_APPROVERS)),'%')||'%'
    AND upper(NOTIFY_APPROVED) LIKE '%'||nvl(upper(DECODE(REGADM_REQUEST_PKG.GET_APPROVAL_NOTIFICATION,'~!@',NULL,REGADM_REQUEST_PKG.GET_APPROVAL_NOTIFICATION)),'%')||'%'
    I would be glad for any suggestions.
    Andy/Varad any ideas? You both helped me a lot on my problems for the same application that I had faced before in More Problems in Tabular form - Please give me suggestions.
    Thanks,
    Sumana

    Hi Andy,
    The view and the package for setting bind variables work properly in my entire application other than the pagination. A pity that I came across this only now :(
    I have used this same method for holding variables in another application before, where I needed to print to PDF. I used this approach in the other application because my queries were not within the APEX character limit specified for the "SQL Query of Report Query shared component".
    In this application, I initially had to fetch values from 2 tables and update the 2 tables. Updateable form works only with one table right? Hence I had created a view. Later the design got changed to include search and instead of changing the application design I just changed the view then. Still later, my clients merged the 2 tables. Once again I had just changed my view.
    Now, I wanted to know if any method was available for the pagination issue (using the view itself). Hence I posted this.
    But as you suggested, I think it is better to change the page design quickly (as it would be much easier).
    If I change the region query to use the table and the APEX bind parameters in the where clause as:
    SELECT *
    FROM REGADM_REQUEST
    WHERE upper(employee_name) LIKE '%'||nvl(upper(:P1_EMPLOYEE_NAME),'%')||'%' .....
    I also changed the ApplyMRU to refer to the table.
    Here the pagination issue is resolved. But here the "last Update By" and "Last Update Date" columns do not get updated with "SYSDATE" and "v(APP_USER)" values, when update takes place. Even if I make the columns as readonly text field, I am not sure how I can ensure that SYSDATE and v('APP_uSER') can be passed to the columns. Any way I can ensure this? Please have a look at the issue here: http://apex.oracle.com/pls/otn/f?p=19399:1:
    I have currently resolved the "last update" column issue by modifying my view as:
    CREATE OR REPLACE VIEW REGADM_REQUEST_V
    AS
    SELECT *
    FROM REGADM_REQUEST
    I modified my region query to use APEX bind parameters itself as:
    SELECT *
    FROM REGADM_REQUEST_V
    WHERE upper(employee_name) LIKE '%'||nvl(upper(:P1_EMPLOYEE_NAME),'%')||'%' .....
    And I use the "INSTEAD OF UPDATE" trigger that I had initially written for update. The code is:
    CREATE OR REPLACE TRIGGER REGADM_REQUEST_UPD_TRG
    INSTEAD OF UPDATE
    ON REGADM_REQUEST_V
    REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    BEGIN
    UPDATE REGREGOWNER.REGADM_REQUEST
    SET MANAGER_EMAIL = :NEW.MANAGER_EMAIL
    , EMPLOYEE_EMAIL = :NEW.EMPLOYEE_EMAIL
    , STATUS_UPDATE_DATETIME = SYSDATE
    , USER_UPDATE_ID = (SELECT v('APP_USER') FROM DUAL)
    WHERE REQUEST_ID = :OLD.REQUEST_ID;
    END;
    Please let me know how I can resolve the "last update" column issue using the table itself. (Just for my learning)
    Thanks,
    Sumana

  • Error when updating data in a form based in a view

    Hi:
    i have 5 tables for enterprise data (telephone, fax and so on). i want to create a form based in all those tables, so i create a view over all the 5 tables and create the form. but when calling the portlet and trying to alter (update, insert, etc.) the data i get this error. Seems that i missed to do something with my tables but i don't know what does that non key-preserved thing mean.The error is the following:
    Error: Cannot link to the module: 1901051912 ORA-01445: cannot select ROWID from a join view without a key-preserved table (WWV-16062)
    An unexpected error occurred: ORA-01445: cannot select ROWID from a join view without a key-preserved table (WWV-16016)
    An unexpected error occurred: ORA-01445: cannot select ROWID from a join view without a key-preserved table-SELECT ROWID, IDBASE,NOMBRE,NOMBRE_FISCAL,NOTAS,BAJA,RETENCION,PREVISION_PAGOS,IVA,CIF,ID_DIRECCION,IDBASE_DIRECCION,CALLE,NUMERO,PISO,MANO,CODIGO_POSTAL,CIUDAD,ID_TELEFONO_EMP,IDBASE_TELEMP,TELEFONO_EMPRESA,ID_FAX_,IDBASE_FAXEMP,FAX,ID_EMAIL_EMP,IDBASE_EMAILEMP,E_MAIL FROM PTSS.A_VISTA where IDBASE=1 ORDER BY ROWID ASC (WWV-16016)
    Any help will be welcomed.
    Thanks in advance.
    Regards. Urko.

    You cannot update, insert, or delete records from a form that's based on a view. That is because rowid is not in the view, so it cannot lock records.

  • Form based on a view -  FRM-40654: Record has been updated by another user.

    Hi All,
    I am hoping that somebody can help me with this problem that is occurring only when I try an update a record in forms.
    I have a block based on a join-view, I can insert no problems, but I can only update certain records within the block. If I come across a second record that is similar to the first except for primary key and a couple of other values and try and update that record forms gives me the following message FRM-40654: Record has been updated by another user. Re-query to see change.
    The first record I have no problems in updating and I have followed a number of suggestions to get this to work, like setting the key-mode of the block to updateable/non-updateable and setting the primary key to 'yes' for some of the database items. I have also created procedures within the database that are called by triggers on-insert, on-update etc.
    If anybody has any ideas how I can solve this I would be happy to hear your suggestions.
    Thanks in Advance.
    Regards,
    Scott.

    Scott,
    beside of
    1) In the block properties change the Key Mode property of the block to be Non-Updatable Primary Key
    2) Mark one or more columns as Primary Key in the item Property Palette - in this instance you would set the property for Empno.
    Enforce Primary Key = no
    Key Mode = Unique
    Update Changed Columns Only = Yes
    I found a bug entry that is supposed to be fixed in Patch 9 of Forms 6i (assuming you are running 6i). So if you could try with a more recent Patch set (e.g. 14) then probably the problem will go away.
    Fran

  • Form Error: form based on a Generic connectivity view

    A view was based on a select from a table in a Syabase database (accessed in Oracle using Generic Connectivity).
    When I built a block in a Form based on that view, I faced the following error:
    ORA-02070: database SYB does not support ROWID in this context.
    Also, the same error appeared in the reports accessing the same view.
    Can anyone give me a clue to solve this problem plz?
    Thanks in advance.

    I later knew that the issue can be addressed by setting the parameter Key Mode to nonupdatable.

  • Create edit form based on view with multiple column key

    Hi
    I have a requirement to create a form to update some tables columns based on a view.
    The problem is that the view has a primary key of 4 columns.
    I have tried to create a rowid key based on one underlying table but this does not work.
    I am calling the form from an interactive report but can only pass 3 keys to the form, so only get 3 fields populated.
    Is there some way i can create the form manually as the wizards cannot cope with this requirement?
    My view is here:
    CREATE OR REPLACE FORCE VIEW "DMOADMIN"."MO_STATUS_LOG_VIEW" ("MONEY_ORD_NO", "STATUS_CODE", "DESCRIP", "STATUS_DATE_TIME", "TXN_DATE_TIME", "LLOG_ID", "LINE_SEQ_NO", "CANCEL_IND", "PROCESS_ID", "PBU_ID", "TXN_SEQ_NO", "CANCEL_REASON", "CONDITION_ID", "ADMIN_DATE_TIME", "ADMIN_LLOG_ID") AS
    SELECT a.money_ord_no,
    b.status_code,
    b.descrip,
    a.status_date_time,
    c.txn_date_time,
    c.llog_id,
    c.line_seq_no,
    c.cancel_ind,
    c.process_id,
    c.pbu_id,
    c.txn_seq_no,
    c.cancel_reason,
    c.condition_id,
    d.txn_date_time admin_date_time,
    d.llog_id admin_llog_id
    FROM mo_status a,
    mo_status_desc b,
    host_txn_log c,
    host_admin_log d
    WHERE a.status_desc_id = b.id
    AND a.money_ord_no = c.money_ord_no(+)
    AND a.status_date_time = c.txn_date_time(+)
    AND a.money_ord_no = d.money_ord_no(+)
    AND a.status_date_time = d.txn_date_time(+)
    WITH CHECK OPTION;
    I have tried to populate the data using with an on load process using a plsql query but it is not working. I get no data found error message. Help!

    Hi Erwin,
    I have a similar situation.
    Tabular form based on a view. The view contains a table in a another instance via dblink and everything works fine.
    The only one difference between my and your view is that my "instead of" view is only for UPDATE. You must to have "intead of" trigger only for UPDATE. Insert and delete works fine withoust "instead of" trigger.
    So, try to delete INSERT and DELETE words from your "INSTEADOFBUBA" trigger.
    hope it helps,
    Mzz

  • Query based on a view

    Hello,
    Software: forms 10g
    problem: I have one block in my form based on a view. It works fine for my English language selection. However, when I switch to French I encounter an error.
    Example:
    Block name: REQUESTS_VIEW
    View_name: REQUESTS_VIEW
    Table: Requests
    Item_name: Office_id
    Column_name: Office_id
    Updatable/Queryable
    Item_name: Office_Name
    Column_name: Off_Eng_name
    Query only option selected
    LOV_OFFICE attached to item
    Office table contains the following columns:
    Office_id, Off_eng_name, Off_fre_name
    In my view I use a decode function for each variable that needs to be translated so that I select the correct column from my table. I did the same for the LOV attached to the office_name item.
    Problem: I cannot set the item_property column name to point to Off_fre_name when user selects French as a language, therefore, I get an error when I query. Oracle does not allow me to do that.
    Possible solution: To redesign each table and add a language column as follows:
    Office table
    Office_id, Office_name, language
    1, Head Office, 1
    1, Bureau Chef, 0
    language table
    language_id, language_name
    0, Français
    1, English
    However, this requires a redesign of my schema. Is there another way I can do this without changing the design structure?
    Thank you very much!
    Claudia

    As of 'I cannot set the item_property column name to point to Off_fre_name when user selects French as a language, therefore, I get an error when I query', I feel that you need to have two items-one for Off_Eng_name and another one for Off_fre_name on your form regardless of the language choice, but you need per language choice to hide the other language item. This way you don't have the above headache.

  • ERROR - 16016 - FOR FORM CREATED ON A VIEW AND USING INSTEAD OF TRIGGER

    I have created a form based on a view. The view has instead of Trigger on it.
    When I try to update the form I get the following error:
    Error: An unexpected error occurred: ORA-22816: unsupported feature with RETURNING clause (WWV-16016)
    Can anyone tell what the problem is?
    Thanks
    null

    THANKS A LOT IT WORKED.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Rene' Castle ([email protected]):
    This is a bug with views. If you can edit the PL/SQL code that is generated, you can remove the RETURNING clause and it will work.
    NOTE: This will have to be done every time you edit the form.
    <HR></BLOCKQUOTE>
    null

  • Custom Forum - Form based on 2 tables

    Hi,
    I've build a forum containing the usual thread and message tables.
    I now need to create an 'Add New Topic' form which pulls in thread.title and message.content. I tried creating a form based on a view but get the "cannot select ROWID from a join view without a key-preserved table (WWV-16016)" error.
    Does anyone know how I can get around this or any method that allows the user to enter a title and message which writes to the Thread and Message tables?
    Thanks.

    Hello,
    You said you're trying to create a form based on a view.
    How do you want to insert data in a view ?
    Try to build your form with the table used in the view.
    Hope that will help

  • Developing forms based on more than one table

    I need to develop a form which requires to insert and query data elements from
    more than one table in the database. Can create a view and develop a form based on the view to achieve this functionality? Also is it better to use portal forms for this purpose or Forms developer 6i for this purpose?
    Any inputs/ideas will be greatly appreciated.
    Thanks,
    Suzanne

    Yes you can do more than one table per form in portal.
    You can base a form on two tables in portal if they are designed as master/detail tables. You can also provide linking to other forms passing parameters from a one form to the next to work with multiple tables. Combining more than two tables into a form using portal would require using a view, I believe.
    HTH

  • Block based on a view

    We have a block which is based on a view. When using Forms 6i 6.0.8.8.0 (no patch), querying from this block cause no problem. However, after applying patch 1 (6.0.8.10.3), the form crashes or take forever to retrieve the data.
    Anyone has run into this problem ?
    Is there a work-around other than installing a full patch ?
    Is this a known bug ?
    Thank you.

    you create the view based on the tables first, then you use form design wizrad to create the form based on the view like a table.
    If you want to allow user to edit the fields, then you may either to create a INSTEAD OF trigger on that view in database, or in form block, using ON-LOCK, ON-UPDATE/INSERT/DELETE triggers to do it.

  • Building a form based on a synonym that points to a database link

    Hello
    Finally I got APEX 3 installed on our test server. I am starting to work with it and I faced my first problem...
    I need to build an application that will query and maintain data stored in another database server. This is because we were not allowed to install APEX in the production server. So I created a schema DEV_USER (which I associated with the workspace). In this schema I created a private database link my_link and a synonym:
    create synonym the_table for the_table@my_link
    I am trying to create a form to query and maintain that table via the synonym but I am not succeeding. The wizard does not work as the synonym is not listed in the table list. Then I created the form manually, creating the items, the Automatic Row Processing process etc. When I run the page I get the error Error ORA-01403: no data found.
    Is it possible to use APEX in this scenario (accessing synonyms that point to database links)? What is the recommended approach in this case?
    Thanks
    Luis

    Hi Kathryn
    Thanks very much for your reply. I did as you suggested; I dropped the synonym and created a view:
    create view my_table as select * from my_table@my_dblink
    ...and was able to create a multirow form based on that view.
    However, when I try to update any value on the form, I get the following error when submitting it:
    Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-01461: can bind a LONG value only for insert into a LONG column ORA-02063: preceding line from DB_LINK, update "APEX_DEV"."MY_TABLE" set "CAMPAIGN_ID" = :b1, "SITE" = :b2, "PERCENTUAL" = :b3, "DURATION_MONTHS" = :b4, "PRG_ID" = :b5, "AFF_ID" = :b6 where "CAMPAIGN_ID" = :p_pk_col and "SITE" = :p_pk_col2
    I thought it was because the form was based on a view; so I dropped the view and re-created the synonym (using the same name). When I tried to submit the updates again I got this error:
    Error in mru internal routine: ORA-20001: Error in MRU: row= 0, ORA-20001: ORA-20001: Current version of data in database has changed since user initiated update process. current checksum = "35636E5FDD251146DB4B7B56119E7914", item checksum = "A884FA378C851786DDFE3A33709CB23C"., update "APEX_DEV"."MY_TABLE" set
    If you or anyone else could point out what I am missing, and maybe explain what those messages mean, it would be great!
    Thanks
    Luis

  • ADF forms based on BPM human tasks - Invoking webservices/view objects.

    Hi All,
    Is anyone aware of whether the following is a valid implementation that has been carried out before.
    1. ADF forms based on BPM 11G human tasks.
    2.The ADF forms invoke webservices via Webservice data controls. It is pertinent to note that the webservice bring back complex data types. We've tried writing a few forms, resulting in data benig brought back, but not being able to print them to the screen.
    3. The ADF forms also use View Object based on sql to bring back tables of data. If view objects are embedded within the forms, the applciation gives rise to a null pointer exception.
    Considering the form will be invoked via a BPM worklist entry, is there a setting or configuration we should consider before hand. Is this feasible, is there knowledge of this being done commercially.
    Any examples or information regarding the same will be immensely helpful.
    Thanks and Regards,
    Preethi.
    NB : I have posted this in the BPM forum as well as I feel it is relevant to both BPM and ADF.

    Hi Joonas.
    Plese let me explain me better for your understanding
    A big summary for what I meant it's the following:
    1- In the procces you made, when you add the HT activity, you have to implement it, this means declare the input(s) parameters you want. This implementation create the .task file.
    2- Create an application, and projects as HT you have. Each poject are based on the .task file, and automatically create a Data Control (for each project based on a .task) with all you need.
    This w'll be an empty application, so you can customize it all you want. The task selected should have all the parameters previously defined. Those parameters can change if you want.
    2- Create a page(s) in the task flow for the task implementation. You can even split the the payload of the task in differents pages, create your custom pages and any logic you need.
    3- An important aspect is how to match these application with the HT implemented in the process. It's possible, it's a configuration en the Enterprise Manager.
    4- Deploy your application
    All these are explain in the book I mentioned
    Th book you can find it here:
    https://blogs.oracle.com/soacommunity/entry/oracle_soa_suite_11g_handbook_1
    Regards Dariel.
    PS: Please, let me know if you need more details.

  • Master/Detail Form based on view(s) - Bug?

    I made a master/detail form that is based on two views, and later master was a view and detail was a table. The form opens OK, but when I click query-button, the following error appears on the screen:
    An unexpected error occurred: ORA-01445: cannot select ROWID from a join view without a key-preserved table (WWV-16016)
    An unexpected error occurred: ORA-01445: cannot select ROWID from a join view without a key-preserved table (WWV-16016)
    When you create a form you are offered three different choices:
    1. Form based on table or view
    Build a form based on a database table or view.
    2. Master-detail form
    Build a master-detail form based on two tables or views. <---- ?????
    3. Form based on procedure
    Build a form based on a database stored procedure
    Is it at all possible to use views with master/detail?

    View should have a rowid. To create a rowid tables have to have foreign key relation. And also in where clause you should have PK-Field-Name=FK-Filed-Name statement.
    null

Maybe you are looking for

  • How do I get rid of the bookmarks toolbar?

    I don't use the Firefox toolbar so would I rather have it gone from my screen and have more screen room. Thank you in advance for your answer.

  • Exports with Oracle Database Vault

    Hi! I've running a Database in version 10.2.0.4 and it has installed Oracle Database Vault, wich is running quite well... I'm trying to export a schema that is protected with a REALM and only the owner of that schema has permision to access the data.

  • What are the security post refresh procedures in general?

    Hi, Can anyone list me out What are the security post refresh procedures in general? Thanks and Regards, Damanaidu J

  • Printing from InDesign Using ICC Profiles

    Hello, I'm trying to find the best way to print from InDesign to my Epson R2400. I'm a graphic design student, with a background in Photography. When printing images from photoshop, I always use the proper paper profile for the inkjet paper I'm using

  • Login Problem with opendocument, flash and QaaWS

    We have the following task: We have an application, an excelsius flash file in BOE (webI) and want to give the users a hyperlink to go directly to this application (after entering their user an password) on the bo-login page. The application itself c