inserting values in tables with 1:m relationship

Posted 07 December 2012 - 01:49 AM

Hi,
I want to insert values into 2 tables Product_Table and Service_Centre_Table which are related to each
other by one to many relationship.Product_Table has S_Code which is primary key of Service_Centre_Table.
So first I am inserting values in the Service_Centre_Table.Before entering values in service centre table
I am checking if the details for that service centre already exist.If the details dont exist,only then the values
are inserted.Now,while entering values into Product_Table I am reading the S_Code value for the service centre from the database and then inserting it into the Product_Table.Values dont get saved to the Product_Table.I dont get any error.