• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

parent key not found

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am getting following error, when insert the data into table

java.sql.SQLException: ORA-02291: integrity constraint (KMS.FK_WK_FUND_ENTITY_02) violated - parent key not found


my query also not working in toad shows same error


query is as follows :

INSERT INTO WK_SHARE VALUES('1233',wk_share_seq.NEXTVAL,'','sxd','asz','jkl','hji','iko','mnj','klo','N','132','39','y','0')


public static final String AD_SHARE = "insert into wk_share values(?,wk_share_seq.nextval,?,?,?,?,?,?,?,?,?,?,?,?,?)";
 
Ranch Hand
Posts: 1228
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Let me give you the solution indirectly.

Create a table called Department with all necessary details
Create a Table Employee with all necessary details it should also have a column called DeptNo and this column should refer to DeptNo column in department table ( Create a REFERENTIAL Integrity Constraint )

insert two rows with departmentNo 10 & 20 in department table insert a row with departmentNo 30 in emp table
[ November 28, 2006: Message edited by: Srinivasa Raghavan ]
 
Pradeep
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks Srini

i got solution from your example.

i was doing like same in my table by inserting differnt value

for fundid column which is common for another table also.
 
reply
    Bookmark Topic Watch Topic
  • New Topic