Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Padding with spaces before update not working

mcardiaSep 15 2015 — edited Sep 17 2015

Hi, I have to insert/update an ERP column that is CHAR NOT NULL.

In this ERP, if the field is null, it must be filled with spaces

Example:

my_field char(100) not null;

So,

when I update this field with empty data, it must be:

update my_table set my_field = rpad(' ', 100)

That is an ERP requirement. I don“t have control over this.

I have a form that mantain a table from this ERP. In the PRE-INSERT and PRE-UPDATE trigger from the datablock I added:

:my_block.my_field := rpad(nvl(ltrim(:my_block.my_field), ' '), 100);

But I still get the error:

ORA-01407: cannot update ("BAAN"."TTBMTB108100"."T$NOCO$O") to NULL

Seems like it is trimming the value.

As workaround, i created a trigger "before insert or update" where i replace the null with spaces... but I wonder if there is an option/property or whatever in forms to make this work as (i think) it should.

Is there?

This post has been answered by InoL on Sep 16 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 15 2015
Added on Sep 15 2015
4 comments
386 views