Skip to content

Roll Back after Fill Dataset

Abdu Rafeeq

Asked Apr 21, 2012, 2:00 AM EDT3 answers
Share
LinkedInX
 How to roll back after fill data into dataset ?

3 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • Senthilkumar
    0
    Hi Abdu,

    There are some methods in the dataset.

               //Create the dataset
                DataSet dataSet = new DataSet();
                //Load the dataset
                dataSet = RetrieveDataSets("SELECT * FROM Employees");

                //Do changes in DataSet

                //Check any changes before do the roll back
                if (dataSet.HasChanges())
                {
                    dataSet.RejectChanges();
                }

    Hope this will help you.
    0
  • 0
    Hai senthil, my actual complaint is given below DbDataAdapter dbAd = DbFactory.CreateDataAdapter(); dbAd.SelectCommand = Command; DataSet Ds = new DataSet(); dbAd.Fill(Ds); Here this fill method data saved successfully in database This sitaution how to rollback saved data... here my commnad text is "exec Procedure"
    0
  • 0
    Hai senthil, my actual complaint is given below DbDataAdapter dbAd = DbFactory.CreateDataAdapter(); dbAd.SelectCommand = Command; DataSet Ds = new DataSet(); dbAd.Fill(Ds); Here this fill method data saved successfully in database This sitaution how to rollback saved data... here my commnad text is "exec Procedure"
    0