Venkata Subbareddy

Venkata Subbareddy

  • 984
  • 774
  • 99.9k

How to Truncate Data in c#

Jun 5 2015 6:09 AM
  Hi All,
 
 iam using  Button Control When User Click the Button only Records is Erase in Table  in the Below My Script  where iam doing Wrong Let me Know.
sql connction con = new sql connction ("Data Source=sys2;Initial Catalog=MuraliIIT;User ID=sa;Password=rits@1234");
string s = "Truncate Table TableName";
sqladapter da = new sql Adapter(s,con);
Dataset ds = new Dataset ();
da.fill(ds,"TableName");

 

Answers (4)