Click here to Skip to main content
15,908,673 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In library management system,
i have stud_reg table of registration, which i give primary key of stud_id field, if student registered than the primary key is start, and i have another tables like book_issue and stud_tab. In book_issue table has fields of stud_id which i give foreign key and store records of book issue transactions. In stud_tab has field of stud_id which i give foreign key ; store all information like, stud_id, book_id,book_name, issue_date, return_date and if late deliver than fine field in it. now, e.g. student want software engineering book and click on issue button than records will inserted but, there is error: foreign key constraint that u don't add or update any records from child to parent. this ok, but, what can i do for issue that book to particular student? there is any way to issue and insert records. thanks for reply..............
Posted
Updated 12-Apr-15 19:03pm
v2

1 solution

You have not posted any code, but based on this information, it appears that the book id has been setup as a foreign key in this table and the 'books' table does not have the id you are trying to insert. Make sure the book exists before inserting into the library transaction tables.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900