PC Review


Reply
Thread Tools Rate Thread

Begin and commit transaction

 
 
Ken Tucker [MVP]
Guest
Posts: n/a
 
      15th Dec 2004
Hi,

http://msdn.microsoft.com/library/de...classtopic.asp

Ken
----------------
"Horace" <(E-Mail Removed)> wrote in message
news:qh3wd.8$(E-Mail Removed)...
Hello

I am writing an ASP.NET / SQL-Server application and wanting to know when to
connect/begin-transaction and commit/disconnect.

I have a common module which I call at the beginning of Page_Load which,
when instantiated performs the connect/begin-transaction. The page then
does what it has to do (eg when a Save button is clicked it will do a
read/write to the database within the btnSave_Clicked event). At the end of
the 'event' (eg btnSave_Clicked) I then do a commit/disconnect.

My question is, is this when the commit/disconnect should be called or is
there an event within the page that gets fired after all click events have
been run and just before the page displays. I know there's a finalize but
is this where these types of tasks are performed.

Or is there another easier/standardized way this is all done.

Cheers
Horace





 
Reply With Quote
 
 
 
 
Horace
Guest
Posts: n/a
 
      15th Dec 2004
Hello

I am writing an ASP.NET / SQL-Server application and wanting to know when to
connect/begin-transaction and commit/disconnect.

I have a common module which I call at the beginning of Page_Load which,
when instantiated performs the connect/begin-transaction. The page then
does what it has to do (eg when a Save button is clicked it will do a
read/write to the database within the btnSave_Clicked event). At the end of
the 'event' (eg btnSave_Clicked) I then do a commit/disconnect.

My question is, is this when the commit/disconnect should be called or is
there an event within the page that gets fired after all click events have
been run and just before the page displays. I know there's a finalize but
is this where these types of tasks are performed.

Or is there another easier/standardized way this is all done.

Cheers
Horace




 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Root transaction wanted to commit, but transaction aborted Vijay Anand Kannan Microsoft Dot NET Framework 1 12th Apr 2005 11:15 AM
commit or rollback a transaction without first beginning a transaction david epsom dot com dot au Microsoft Access VBA Modules 17 25th Feb 2005 01:22 PM
Root transaction wanted to commit, but transaction aborted =?Utf-8?B?S2FydW4gS2FydW5ha2FyYW4=?= Microsoft Dot NET Framework 2 23rd Jul 2004 07:33 PM
Transaction Commit TimeOut but Transaction still completes =?Utf-8?B?SHVhbg==?= Microsoft ADO .NET 8 7th May 2004 05:01 AM
The root transaction wanted to commit, but transaction aborted Grober Microsoft ADO .NET 1 24th Nov 2003 02:55 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:03 AM.