1
Answer

Delete Term in SharePoint 2010 Programmatically Using VS 201

Cliff Fernandes

Cliff Fernandes

11y
1.1k
1
Hi,
 
http://www.c-sharpcorner.com/UploadFile/54db21/delete-term-in-sharepoint-2010-programmatically-using-vs-201/
 
I have been asked to looking at auto deleting terms in SharePoint 2010.
 
Will the solution above link work using Visual Studio 2010. I see your article is using Visual Studio 2012.
 
We only have 2010 version.
 
Also, if we have over 100 terms to delete, is there a better way to delete in one go?
 
Thanks and appreciate your help,
Cliff Fernandes 
Answers (1)
0
Vikram N
NA 66 14.7k 11y
thank u Sanjeeb...Lemme try it out...:)
0
Sanjeeb Lenka
NA 22.1k 1.3m 11y
check this code:

public int SaveEmp(Emp objEmp)
{
using (SqlConnection con = new SqlConnection("Data Source=.\\SQLEXPRESS;Initial Catalog=Test;Integrated Security=True"))
{
 string query = "Emplyentry";  //stored procedure name
using (SqlCommand cmd = new SqlCommand(query , con))
{
cmd.Parameters.AddWithValue("@EmpName", objEmp.EmpName);
cmd.Parameters.AddWithValue("@EmpSal", objEmp.EmpSal);
con.Open();
int a = cmd.ExecuteNonQuery();
con.Close();
return a;
}

}
}
0
Vikram N
NA 66 14.7k 11y
Thanx a lot for ur kind reply Sanjeeb,That linkhelped me a lot...
But in dat example, database tables are used... But i need stored procedures usage... kindly help:)