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
 General SQL Server Forums
 New to SQL Server Programming
 Getting error when trying to delete a list of file

Author  Topic 

jarablue
Starting Member

9 Posts

Posted - 2010-05-12 : 00:14:42
I am trying to delete a bunch of files from a table that has a certain process state #. In this case I am running...delete from tblorigpackage where processstate=41 but I am getting this error "DELETE statement conflicted with COLUMN REFERENCE constraint 'FK_tblOrigMpegFile_tblOrigFile'. The conflict occurred in database 'SeacAdRouterDb', table 'tblOrigMpegFile', column 'tblOrigFile_Id'.
The statement has been terminated.
"

What does that mean? I can't seem to get the list of videos deleted. Why is this happening. By the way...first post! Nice to meet everyone :)

sql-programmers
Posting Yak Master

190 Posts

Posted - 2010-05-12 : 01:03:18
There may be a relationship between tblorigpackage,tblOrigMpegFile and tblOrigFile tables.
So you must delete the Foreign Key reference table value first before deleting tblorigpackage table value.

SQL Server Programmers and Consultants
http://www.sql-programmers.com/
Go to Top of Page

jarablue
Starting Member

9 Posts

Posted - 2010-05-12 : 03:24:25
So would I search those tables for the videos that are in processstate of 1 from the original table.
Go to Top of Page
   

- Advertisement -