Can't delete Work Item in TFS 2008

Topics: Developer Forum
Dec 3, 2008 at 7:45 AM
Hi Guys,

I have tested on TFS 2008 and It does not work. I found that the deleted query in TheGovernator.Exterminate does not correct. This method should be like below

 

 

 

public int Exterminate(int ID)

 

{

 

string strID = ID.ToString();

 

 

SqlCommand command = new SqlCommand("delete from dbo.WorkItemsLatest where ID = "

 

 

 

+ strID +

" delete from dbo.WorkItemsAre where ID = " + strID + " delete from dbo.WorkItemsWere where ID = " + strID

 

+

" delete from dbo.WorkItemLongTexts where ID = " + strID + " delete from dbo.WorkItemFiles where ID = " + strID, _connection);

 

 

return command.ExecuteNonQuery();

 

}

 

 

Thanks,

iRat