Home » Developer & Programmer » Application Express, ORDS & MOD_PLSQL » Tabular Form created on a View is not Updating (APEX 4.2.2.00.11)
Tabular Form created on a View is not Updating [message #600029] Thu, 31 October 2013 00:16 Go to next message
mm_kanish05
Messages: 493
Registered: January 2007
Location: Chennai
Senior Member

Dear Experts,


I have created an Update only Tabular Form based on a Query that uses multiple tables, when I update the Tabular Form it throws the following error.

Error:
Current version of data in database has changed since user initiated update process. current row version identifier = "B89EC242C8E18CD81E441889ADFF4A40" application row version identifier = "A884FA378C851786DDFE3A33709CB23C" (Row 1)

My requirement is to insert data into a single table from that query.My query brings 3 columns with multiple records as static fields (non-updatable) and the other 4 fields are updatable and has to insert the data into a single table.

I also tried creating a view based on the same query and used it in the Tabular Form , but still it threw the same error. So I tried creating an instead of trigger for the view and still it threw the same error, but I am able to perform update on the view from the backend and data was inserted into that table also.

Can someone please tell me a solution to fix this error? Do I need to do any specific setting or add any process apart from the Apply MRU Process that is automatically created when a Tabular Form is created on a View?


Thanks and regards,

Kanish
Re: Tabular Form created on a View is not Updating [message #600065 is a reply to message #600029] Thu, 31 October 2013 08:52 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
When I began to read your message, my first thought was "INSTEAD OF trigger". Apparently, you created it and - as you said - it works when you do INSERT or UPDATE in SQL*Plus (or whichever tool you use).

How did you create a tabular form? What operations did you allow (is it "update only")? What is the primary key type (ROWID or primary key) (I presume ROWID)? If it is primary key, what do you populate primary key columns (trigger / function / sequence)? I don't know what is the right combination of the above options; if you have some time to spare, try to combine them and, hopefully, you'll make it work. Sorry for not being able to help any better.
Re: Tabular Form created on a View is not Updating [message #600232 is a reply to message #600065] Sun, 03 November 2013 22:27 Go to previous messageGo to next message
mm_kanish05
Messages: 493
Registered: January 2007
Location: Chennai
Senior Member

Hi,

Its an "Update Only" Tabular form. Using ROWID as PK for a Tabular Form throws an error and doesnt allow me to create it, so I have used "BOOKING_ID" as the PK which is generated through an existing sequence as the PK.
Re: Tabular Form created on a View is not Updating [message #600242 is a reply to message #600232] Mon, 04 November 2013 00:44 Go to previous message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I see ... unfortunately, I'm not sure that this is the right choice. It means that a view has a primary key column, and it is the BOOKING_ID. Views don't and can't have primary key constraints, so that's rather doubtful. It looks as a nice try to fool Apex, but - eventually - it realized that it can't work.

As you saidQuote:
... other 4 fields are updatable and has to insert the data into a single table
could you rewrite it so that page is based on the "single table" you mentioned? If not, there's nothing much I can say about it. I never had the same problem so my experience equals zero.
Previous Topic: How to add new label template to existing theme
Next Topic: Changing the default date to DD-MM-YYYY
Goto Forum:
  


Current Time: Thu Mar 28 11:11:37 CDT 2024