Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Other SQL Server Topics (2005)
 Sql Query

Author  Topic 

Santosh2128
Starting Member

1 Post

Posted - 2009-12-01 : 02:05:12
When i selected some value to delete and then make that textbox and clicking on the delete button then i am getting the error message like

The DELETE statement conflicted with the REFERENCE constraint "FK_BRANCH_AREA_MASTER". The conflict occurred in database "AmorBliss", table "BLISS.BRANCH", column 'AREAID'.
The statement has been terminated.

What should i do plz help me




satosh143

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-12-01 : 02:08:32
You need to delete the data in the order of your foreign key constraints. All child data must be deleted before the parent data can be deleted. You are getting the error because you are trying to delete parent data but associated child data exists.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page
   

- Advertisement -