Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE » How To » MULTI4 Update Problem
MULTI4 Update Problem [message #2155] Wed, 24 June 2009 06:12 Go to next message
ajwid01 is currently offline  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.

Surprised

T.
Re: MULTI4 Update Problem [message #2157 is a reply to message #2155] Wed, 24 June 2009 11:39 Go to previous messageGo to next message
ajwid01 is currently offline  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 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2347
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.


Re: MULTI4 Update Problem [message #2166 is a reply to message #2155] Thu, 25 June 2009 04:42 Go to previous messageGo to next message
ajwid01 is currently offline  ajwid01
Messages: 26
Registered: June 2009
Location: UK
Junior Member
Still not debugged this BUT:

This morning I decided to carry on and "refine" a few things within the application anyway - such as the actual columns that I didn't want to be edittable (for the future).

Once I had actually done this, the MULTI4 pattern worked perfectly fine. Updates were successful to both inner and outer record sets!

Ho-hum!

Smile

I'll likely come back to this at some point, for academic value, and see if I can debug what was happening earlier.

T.
Re: MULTI4 Update Problem [message #2167 is a reply to message #2166] Thu, 25 June 2009 04:58 Go to previous message
AJM is currently offline  AJM
Messages: 2347
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.


Previous Topic: Drop Down Boxes 'Blank'
Next Topic: Document Management like workflow
Goto Forum:
  


Current Time: Thu Mar 28 11:20:47 EDT 2024

Total time taken to generate the page: 0.01181 seconds