I have one table [Software] and have 2 foreign key [Brand_ID,Category_ID]. I have bonded the 2 table [Brand and Category] with a drop down list.
When the insert statement is executing I am getting the INSERT statement conflicted with the FOREIGN KEY constraint
error.
Here is the code:
Insert INTO tblSoftware(Description,Date_Of_Purchase,Price,Brand_ID,Category_ID) Values (@Description,@Date_Of_Purchase,@Price,@Brand_ID,@Category_ID)", con);
When I remove the Brand_ID and Category_ID from the sql statement, it is inserting fine.
How do i solve this?
Thanks