DataSet.Clear problem
-
hi i have a method that return DataTable (named GetData), now i want to load returned DataTable object to DataSet by this code :
this.ds.Load(dal.GetData(cmd1).CreateDataReader(), LoadOption.OverwriteChanges, new string[] { "transaction1" });
but before, load data, i want to clear some tables of my dataset objects by this code :
this.ds.Tables[0].Clear(); // error in this line
but at runTime the following error has shown me :
Cannot find table 0
how to solve my problem and how to clear before fill ? thanks
-
hi i have a method that return DataTable (named GetData), now i want to load returned DataTable object to DataSet by this code :
this.ds.Load(dal.GetData(cmd1).CreateDataReader(), LoadOption.OverwriteChanges, new string[] { "transaction1" });
but before, load data, i want to clear some tables of my dataset objects by this code :
this.ds.Tables[0].Clear(); // error in this line
but at runTime the following error has shown me :
Cannot find table 0
how to solve my problem and how to clear before fill ? thanks
-
hi i have a method that return DataTable (named GetData), now i want to load returned DataTable object to DataSet by this code :
this.ds.Load(dal.GetData(cmd1).CreateDataReader(), LoadOption.OverwriteChanges, new string[] { "transaction1" });
but before, load data, i want to clear some tables of my dataset objects by this code :
this.ds.Tables[0].Clear(); // error in this line
but at runTime the following error has shown me :
Cannot find table 0
how to solve my problem and how to clear before fill ? thanks