Re: "transactions" on a DataSet object

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Sahil Malik (contactmethrumyblog_at_nospam.com)
Date: 01/07/05


Date: Thu, 6 Jan 2005 21:07:12 -0500

So essentially you also need savepoints in your transaction? No can do !! I
don't think that's possible to do within a dataset without a full deep copy.

- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik

"cyourch" <cyourch@discussions.microsoft.com> wrote in message
news:53DEE8CB-8616-4226-A9B0-45EB998F25AE@microsoft.com...
> No. That will throw away any changes that are pending just before I would
> start my "transaction".
>
> "David Browne" wrote:
>
>>
>> "cyourch" <cyourch@discussions.microsoft.com> wrote in message
>> news:57EF08A4-2015-4B9B-A74A-682DF6588574@microsoft.com...
>> > Hi,
>> >
>> > What I want to do is to somehow start a "transaction" on a DataSet
>> > object.
>> > Once the "transaction" is started I will be making changes to the
>> > DataSet.
>> > If
>> > the user wants to save the changes then I essentially don't need to do
>> > anything with the DataSet. BUT, if the user wants to throw away all
>> > changes
>> > then I want to revert back to the state the DataSet was in before the
>> > "transaction" was started. I can always make a copy in memory of the
>> > DataSet
>> > but that seems to be resource intensive. Are there any other ways to
>> > save
>> > the
>> > state/date of the DataSet and then restore it back to this state?
>> >
>>
>> DataSet.RejectChanges rolls back all changes since the last
>> DataSet.AcceptChanges.
>>
>> David
>>
>>
>>



Relevant Pages

  • Re: Autonomous Transactions
    ... Note that savepoints are a convenient way to place markers as to places ... in the transaction flow you may want to rollback, ... data, and if the inner most procedure issues a commit, it will affect ...
    (comp.databases.oracle.server)
  • Re: undefined behaviour for sub-transactions?
    ... > savepoints within a transaction and roll back to a given savepoint and then ... > continue the transaction from there. ... when DBI talks to a driver, ... glue these small tasks together into big tasks (such as updating a table and ...
    (perl.dbi.users)
  • Re: Transaction span stored procedures
    ... spanning a transaction over multiple stored procedures? ... > Savepoints" in SQL BOL. ... > transactions inside stored procedures. ...
    (microsoft.public.sqlserver.programming)
  • Re: Transaction span stored procedures
    ... See "Rollbacks in Stored Procedures and Triggers" and "Transaction ... Savepoints" in SQL BOL. ... It is @@trancount and you have to use savepoints to manage nested ...
    (microsoft.public.sqlserver.programming)