Results 1 to 2 of 2

Thread: transaction

  1. #1
    Join Date
    Dec 1969

    Default transaction

    I need to update records in a database. In order to do this, I&#039;m performing a "delete" (on the original record) and "insert" (on the new record) since the record I&#039;m deleting is part of the key. This is being done via the "da.update(dt)" method. The first record is marked for deletion and the second one for insertion from the rowstate inside the datatable.<BR><BR>Another way is to make separate passes to the db creating a transaction before the "delete" and commiting after the "insert". However, because of the application logic, this is not conducive to the scenario.<BR><BR>What I&#039;d like to know is: "Do I need to encircle the above "update" statement within a transaction or does .Net do this for you automatically. The reason I&#039;m wondering is because the "update" statement will perform this step in one db pass (although each row within the dataset actually gets updated accordingly to the rowstate)...<BR><BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: transaction

    .NET does not have auto transactions if you want to use one, which you do, you have to set it up manually.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts