Transaktion mit Access

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Christoph Basedau (e_tonne_at_hotmail.com)
Date: 01/08/05


Date: Sat, 08 Jan 2005 04:05:14 +0100

Hallo

Ich verwende in einer VB-Anwendung eine Jet4.0-Datenbank, Datenzugriffe
erfolgen über ADO. Bei manchen mehrstufigen Updates und Inserts
wäre es sinnvoll, das als Paket, sprich Transaktion, abzusetzen.

Muss man dazu eigentlich zu Beginn der TA nur ein
'adoConnection.BeginTrans'[1] absetzen und nach Abschluss aller Updates ein
CommitTrans (oder RollBackTrans, bei Fehlern) oder bedarf es dazu
zusätzlicher Maßnahmen?

[1] Bzw die SQL-Kommandos BEGIN TRANSACTION, COMMIT TRANSACTION
und ROLLBACK TRANSACTION.

-- 
Gruesse, Christoph
Rio Riay Riayo - Gordon Sumner, 1979


Relevant Pages

  • RE: Master/Detail Transactions
    ... If any of the updates fails, ... pending parent and child rows within the scope of a transaction, ... cascade newly retrieved parent identity values down to pending child rows ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Recordset.AddNew and the recordset objects data retaining
    ... I absolutely think that in extremely large jobs, ... I know, I could send a single transaction containing 10,000 records but it ... > physical memory to accommodate the TWO sets of 100,000 records: ... >> The statement you make about the individual updates not hitting the ...
    (microsoft.public.data.ado)
  • Re: Recordset.AddNew and the recordset objects data retaining
    ... The statement you make about the individual updates not hitting the database ... to do with the updates being in a transaction but rather on whether you specify ... spill over and the memory starts paging out to disk that concerns me). ...
    (microsoft.public.data.ado)
  • Re: Using transactions to insert into to a table while allowing read access to existing data
    ... purpose but to roll back the transaction. ... rows with uncommitted updates are marked with locks. ... isolation level is READ COMMITTED, ... then finally committing the transaction. ...
    (microsoft.public.sqlserver.programming)
  • Re: Cant use autonumber
    ... Another respondent has pointed you to his own answer. ... As for wrapping multiple updates into a single transaction: ... >> you can wrap that update into the transaction used by the bound form. ...
    (microsoft.public.access.formscoding)