Home » Developer & Programmer » Forms » Unable to form relationship (Forms 6i)
Unable to form relationship [message #565334] Mon, 03 September 2012 11:58 Go to next message
arif_md2009
Messages: 732
Registered: May 2009
Location: United Arab Emirates
Senior Member

I have two tables and i am trying to form a relationship but unable to do, its giving me error .error while parsing ,can someone help me resolve this, i really dont know.actually there is one table ot_insp_item which is referred in two blocks and the other is detail block.
Re: Unable to form relationship [message #565338 is a reply to message #565334] Mon, 03 September 2012 13:24 Go to previous messageGo to next message
cookiemonster
Messages: 13925
Registered: September 2008
Location: Rainy Manchester
Senior Member
You should really know by now that you need to give precise details of what you are doing.
Describe the table, what goes in each block and what the relationship between them should be.
Re: Unable to form relationship [message #565369 is a reply to message #565338] Tue, 04 September 2012 01:29 Go to previous messageGo to next message
arif_md2009
Messages: 732
Registered: May 2009
Location: United Arab Emirates
Senior Member

Thanks cookiemonster for the help, yeah i agree with you actually the problem is i have that form which i cannot attach due to this site limitation but when i build relationship using seperate form its working , the tables go like this .One header ot_insp_head,one detail linked to it ot_insp_item and another detail linked to this detail as stacked ot_insp_heat.

create table OT_INSP_HEAD
(IH_SYS_ID NUMBER,
IH_TXN_CODE VARCHAR2(12),
IH_NO       NUMBER);

CREATE UNIQUE INDEX OT_INSP_HEAD_PK ON OT_INSP_HEAD
(IH_SYS_ID);

ALTER TABLE OT_INSP_HEAD ADD (
  CONSTRAINT OT_INSP_HEAD_PK
 PRIMARY KEY
 (IH_SYS_ID));


create table OT_INSP_ITEM
(II_SYS_ID NUMBER,
II_ITEM_CODE VARCHAR2(12),
II_QTY        NUMBER,
II_QTY_LS      NUMBER);

CREATE UNIQUE INDEX OT_INSP_ITEM_UK ON OT_INSP_ITEM
(II_SYS_ID);

CREATE INDEX OT_INSP_ITEM_NX_01 ON OT_INSP_ITEM
(II_IH_SYS_ID);


ALTER TABLE OT_INSP_ITEM ADD (
  CONSTRAINT OT_INSP_ITEM_FK_01 
 FOREIGN KEY (II_IH_SYS_ID) 
 REFERENCES OT_INSP_HEAD (IH_SYS_ID));

create table OT_INSP_HEAT
(IG_SYS_ID NUMBER,
IG_II_SYS_ID NUMBER,
IG_QTY       NUMBER);

CREATE INDEX OT_INSP_HEAT_IDX_01 ON OT_INSP_HEAT
(IG_II_SYS_ID);

CREATE UNIQUE INDEX OT_INSP_HEAT_PK ON OT_INSP_HEAT
(IG_SYS_ID);


ALTER TABLE OT_INSP_HEAT ADD (
  CONSTRAINT OT_INSP_HEAT_PK
 PRIMARY KEY
 (IG_SYS_ID));


ALTER TABLE OT_INSP_HEAT ADD (
  CONSTRAINT OT_INSP_HEAT_FK_1 
 FOREIGN KEY (IG_II_SYS_ID) 
 REFERENCES OT_INSP_ITEM (II_SYS_ID));





--i want to build the relation between ii_sys_id and ig_ii_sys_id in forms6i but couldnt



Re: Unable to form relationship [message #565420 is a reply to message #565369] Tue, 04 September 2012 06:18 Go to previous messageGo to next message
cookiemonster
Messages: 13925
Registered: September 2008
Location: Rainy Manchester
Senior Member
That's the tables.
You haven't said what steps you are taking in form builder to create the relationship.
You need to create it on the OT_INSP_HEAT block.
Re: Unable to form relationship [message #565423 is a reply to message #565420] Tue, 04 September 2012 06:33 Go to previous messageGo to next message
arif_md2009
Messages: 732
Registered: May 2009
Location: United Arab Emirates
Senior Member

Steps only 2 , i tried first building relationship manually as you said by linking ot_insp_heat.ig_ii_sys_id = ot_insp_item.ii_sys_id it failed then i tried using wizard by creating the block again it failed.can i send you the form as attachment to your email id cookiemonster if you have one please share the email id to me.
Re: Unable to form relationship [message #565424 is a reply to message #565369] Tue, 04 September 2012 06:34 Go to previous messageGo to next message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
It seems that you didn't post correct script (as OT_INSP_ITEM table misses the II_IH_SYS_ID column) so ... it fails.

Anyway: imagine that there is that column in the table. Then, the relationship is as follows:
                                                  OT_INSP_HEAT
			 OT_INSP_ITEM             ==============
OT_INSP_HEAD             =================        IG_SYS_ID (PK)
==============           II_SYS_ID (PK)     <---- IG_II_SYS_ID (FK)
IH_SYS_ID (PK)   <-----  II_IH_SYS_ID (FK)

Forms' data block wizard *should* be capable of automatically creating master-detail relationship, based on information it finds in the database (foreign keys). Even if it can not do that, you can manually join columns.

I don't have any Forms installation here so I can't test it myself, but I sincerely hope that it would work just OK.
Re: Unable to form relationship [message #565426 is a reply to message #565424] Tue, 04 September 2012 06:52 Go to previous messageGo to next message
cookiemonster
Messages: 13925
Registered: September 2008
Location: Rainy Manchester
Senior Member
Do the datablocks contain the items you are trying to link on?
Which block did you bring the datablock wizard up for?
A screenshot of the datablock wizrd may help.
Re: Unable to form relationship [message #565430 is a reply to message #565426] Tue, 04 September 2012 07:14 Go to previous messageGo to next message
arif_md2009
Messages: 732
Registered: May 2009
Location: United Arab Emirates
Senior Member

Dear cookiemonster ,please find below the screen shot /forum/fa/10400/0//forum/fa/10401/0/
Re: Unable to form relationship [message #565432 is a reply to message #565430] Tue, 04 September 2012 07:18 Go to previous messageGo to next message
cookiemonster
Messages: 13925
Registered: September 2008
Location: Rainy Manchester
Senior Member
You haven't actually answered either of my questions and that screenshot isn't of the datablock wizard.
Re: Unable to form relationship [message #565433 is a reply to message #565430] Tue, 04 September 2012 07:19 Go to previous messageGo to next message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Try to remove table (block) names from the join condition and leave only
ig_ii_sys_id = ii_sys_id
Re: Unable to form relationship [message #565434 is a reply to message #565433] Tue, 04 September 2012 07:27 Go to previous messageGo to next message
cookiemonster
Messages: 13925
Registered: September 2008
Location: Rainy Manchester
Senior Member
I'd be amazed if the block names were the problem.
Re: Unable to form relationship [message #565435 is a reply to message #565434] Tue, 04 September 2012 07:39 Go to previous messageGo to next message
cookiemonster
Messages: 13925
Registered: September 2008
Location: Rainy Manchester
Senior Member
Works for me

/forum/fa/10403/0/

/forum/fa/10402/0/

/forum/fa/10404/0/
Re: Unable to form relationship [message #565437 is a reply to message #565435] Tue, 04 September 2012 07:43 Go to previous messageGo to next message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Cookiemonster, it seems that you use Windows XP. Arif_md2009 uses Windows 7 (at least, that's what screenshot looks like). If that's so, and regarding the fact that Forms 6i is far from being certified with Windows 7, this might be one of "non-working" features that suffer from running such a combination of Oracle software and the operating system.
Re: Unable to form relationship [message #565438 is a reply to message #565435] Tue, 04 September 2012 07:46 Go to previous messageGo to next message
arif_md2009
Messages: 732
Registered: May 2009
Location: United Arab Emirates
Senior Member

Appreciate your help cookiemonster , but unfortunately the form which i am having is from the vendor himself and i am unable to do what you did , can i send you thru email so that you can check.THanks for your help littlefoot , its not an operating system issue too as i tried on other os as well and removed the block and tried too.
Re: Unable to form relationship [message #565439 is a reply to message #565438] Tue, 04 September 2012 07:50 Go to previous messageGo to next message
cookiemonster
Messages: 13925
Registered: September 2008
Location: Rainy Manchester
Senior Member
Then maybe you should ask the vendor to fix it?
Have you checked that the blocks contain the items you are trying to link on like I asked?
And no you can't email it to me, sorry.
Re: Unable to form relationship [message #565441 is a reply to message #565439] Tue, 04 September 2012 07:58 Go to previous messageGo to next message
arif_md2009
Messages: 732
Registered: May 2009
Location: United Arab Emirates
Senior Member

The problem is we don't have the support from the vendor anymore and we cannot ask him.I will recreate this form.Thanks very much cookiemonster for the help.
Re: Unable to form relationship [message #565442 is a reply to message #565439] Tue, 04 September 2012 07:59 Go to previous messageGo to next message
arif_md2009
Messages: 732
Registered: May 2009
Location: United Arab Emirates
Senior Member

yes the blocks have the items, thanks for the help cookiemonster.
Re: Unable to form relationship [message #565448 is a reply to message #565439] Tue, 04 September 2012 08:39 Go to previous message
arif_md2009
Messages: 732
Registered: May 2009
Location: United Arab Emirates
Senior Member

Hi cookiemonster is there any workaround like without doing relationship can we do the same thing manully what relationship does by writing necessary triggers like on-populate details and on-check delete.
Previous Topic: Top down organizational structure
Next Topic: Direct Printing - Having error in java console relating to PDFBox-app-1.7.1.jar
Goto Forum:
  


Current Time: Sat Jul 06 09:33:04 CDT 2024