Transaction DataAdapter

Posts   
 
    
hommels
User
Posts: 23
Joined: 01-Jul-2005
# Posted on: 22-Jul-2005 15:52:13   

//Transaction trans = new Transaction System.Data.IsolationLevel.ReadCommitted, "EmailUser");

adapter.StartTransaction(System.Data.IsolationLevel.ReadCommitted, "EmailUser");

EmailEntity e = new EmailEntity(); e.EmailId = EmailIdUser; e.FromPersonId = SupportId; e.FromDisplayName = SupportName; e.FromEmailAddress = SupportEmail; e.Subject = this._Subject; e.Body = this._Body; e.ApplicationName = "";

//trans.Add( e ); //e.Save(); Does this line of code replace 2 lines of code above it adapter.SaveEntity(e); or do you have to add to trans and then save(if so what would the line of code be?)

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 22-Jul-2005 16:40:00   

In adapter you don't have to add to a transaction, you just start a transaction on the adapter, then call the save/delete methods you want, as discussed in the documentation.

Frans Bouma | Lead developer LLBLGen Pro
hommels
User
Posts: 23
Joined: 01-Jul-2005
# Posted on: 22-Jul-2005 16:43:24   

Thanks