Home » Developer & Programmer » Forms » multiple items with the same database column name (Forms 6)
multiple items with the same database column name [message #487564] Tue, 28 December 2010 18:39 Go to next message
john70carlson
Messages: 2
Registered: December 2010
Location: United States
Junior Member
Hi,

I am coming across a requirement wherein a databse cloumn is shred by 2 fields..( need to append the value to the data-base column for the 2nd field.

I dint test it yet but the form compliled with warning
FRM-30431: Warning: Duplicate column name in same block

is it ok to further go or its not allowed at all?

ALso , if anybody has idea how to implement this.

Thanks
John
Re: multiple items with the same database column name [message #487597 is a reply to message #487564] Wed, 29 December 2010 01:26 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
No, you can't do that - as Forms already told you, this is an error.

Something's wrong with either data model or its implementation. If the requirement says that there should be two form items, then the table should contain two columns (instead of one). Or, if it *must* be a single column, then you'd also use a single form item.

However, if you insist, then create two non-database items that are visible on the form. A database item doesn't have to be visible; populate it in one of form triggers (either after those two non-database items are populated - that might be a WHEN-VALIDATE-ITEM on the second item), or before inserting records into the database (in that case, you'd use PRE-INSERT trigger).
Re: multiple items with the same database column name [message #487665 is a reply to message #487597] Wed, 29 December 2010 12:07 Go to previous messageGo to next message
john70carlson
Messages: 2
Registered: December 2010
Location: United States
Junior Member
Thnaks for your response..

But ..just would like to metion that its a Warning..and fmx is created so was jus wornderring if it would go through.

Thanks
Re: multiple items with the same database column name [message #487672 is a reply to message #487665] Wed, 29 December 2010 13:44 Go to previous message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
When you commit changes you made in a form, which value will be saved into the database? From which of two items you said they were database items, sharing the same column name?
Previous Topic: LOV should not repeat values
Next Topic: PLSQL Colections in Datablock
Goto Forum:
  


Current Time: Thu Sep 19 13:54:35 CDT 2024