3
Answers

grid View with Sql server

kritika Rana

kritika Rana

10y
941
1
Hi
 
I have created two tables Category(C_ID, C_Name) and Sub_category (S_ID,S_Name,C_ID[fk])
I have dispyed the data in the gridview using sql server configuration with enabled edit and delete  options  
Edit is working properly but when I try to delete the row it show Error message
 

The DELETE statement conflicted with the REFERENCE constraint "FK__sub_catego__C_ID__60083D91". The conflict occurred in database "master", table "dbo.sub_category", column 'C_ID'.
The statement has been terminated.

Kindly help me in solving this problem.
 
Thanks
Kritika 
Answers (3)