MULTI4 Update Problem [message #2155] |
Wed, 24 June 2009 06:12 |
ajwid01
Messages: 26 Registered: June 2009 Location: UK
|
Junior Member |
|
|
Hi,
I have successfully implemented a MULTI2 pattern, where I can bulk update multiple child records of a parent.
However, when I am attempting a MULTI4 pattern for the same parent/child, I am encountering an issue with the update against the parent.
For some reason, after submit, the SQL is attempting to make a modification to the second element of the PK (which is not actually listed as modifiable).
The field is a VARCHAR2(4), and the return code suggests that it is being attempted to update this field to more than 4 characters.
("order_line_no cannot be greater than 4 characters.")
Actually, maybe this is not an output from a SQL error, but an inbuilt validation output, but I can't understand why it can report a validated field value but pressing submit would potentially alter the PK composite to something which would violate the mechanics.
T.
|
|
|
Re: MULTI4 Update Problem [message #2157 is a reply to message #2155] |
Wed, 24 June 2009 11:39 |
ajwid01
Messages: 26 Registered: June 2009 Location: UK
|
Junior Member |
|
|
As an update:
There are a couple of different scenarios occurring here:
Case 1:
Parent Record has NO Child Records
Parent/Outer records can be ammended, and correctly updates on submit.
Case 2:
Parent Record HAS Child Records
Parent and Child records can be ammended, but pressing submit generates an error suggesting that the parent composite PK field(2) is too long.
At this point, the parent record is still visible, but the child records are missing from the screen display.
Re-pressing submit allows the parent record to be updated successfully.
However, refreshing the screen/re-navigating to this record shows that the child record edits have not been applied.
Any attempt to ammend the child records results in the same error (suggesting that the PK second field is too long on the parent record).
T.
[Updated on: Wed, 24 June 2009 11:40] Report message to a moderator
|
|
|
Re: MULTI4 Update Problem [message #2160 is a reply to message #2157] |
Wed, 24 June 2009 17:00 |
AJM
Messages: 2368 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
I have a MULTI4 task in the data dictionary (update relaionship) which works OK, so there is nothing wrong with the basic code. I cannot reproduce the error you are gettig, so I cannot debug it.
This is where you need to step through with your debugger to see where the code is going wrong.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
|
Re: MULTI4 Update Problem [message #2167 is a reply to message #2166] |
Thu, 25 June 2009 04:58 |
AJM
Messages: 2368 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
I'm glad your problem is sorted. If it has disappeared it might prove difficult to debug in the future as you may not be able to recreate the conditions which caused this problem.
One thing that you have to remember after modifying a database table is that you must import the new schema into the data dictionary so that it is in sync, then you must export the changed tables so that the application has access to the latest <table>.dict.inc files. If, for example, you change a table to add a second column to the primary key but forget to import/export the changes, then the framework does not know that the 2nd column is part of the key. Similarly if you change the size of a column - unless you import/export the change the framework will work with the old values.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|