RE: how to use Begintransaction ?

From: Cowboy (Gregory A. Beamer) - MVP (NoSpamMgbworld_at_comcast.netNoSpamM)
Date: 12/28/04


Date: Tue, 28 Dec 2004 11:33:04 -0800

If you are using web services and want transactional data, you will have to
throw all 7 at once. But, there are other options:

1. Put the days in a temporary table of some sort (not necessarily
#tableName type of temp table, but rather something you will clear out when
all of the data is there). You can then have the data migrated into the
normal structure when the 7th arrives (part of the stored procedure). Clear
out the table of bad records on a daily basis is an option for cleaning.

2. Compile the information into one stream of data and pass that to the web
method. You then control when the data is sent, which is "only when all 7
days are there".

---
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************
"Jason Shohet" wrote:
> Page_a.aspx.cs  does a loop thru 7 days of the week.  W/in the loop, it 
> makes a call to myService - a webservice - passing in a serialized objDay 
> (which represents the day's info).  The webservice function deserializes 
> objDay and writes to the db.
> 
> Works great.  Problem is if 1 of the 7 days fails to write, there's no 
> rollback functionality.  I want it so that if a day doesn't write, none of 
> the days should write.   BeginTransaction is a property of the transaction 
> object.  But my transaction object exists only in the webservice, and that 
> webservice is killed and recalled every day of the 7 days of the week.  So 
> there's no continuity there.  Is there any way to get the rollback 
> functionality I'm looking for?
> 
> The only thing I can think of is somehow get objDay1, objDay2.....objDay7 
> and pass them ALL at one time to the webservice, which will then be able to 
> do all the transactions at once with a beginTransaction at the begining.... 
> But this is more complex because actually, we don't always pass in 7 days. 
> Sometimes the user only modifies 3 days, in which case we only need to write 
> to the db 3 times.
> 
> Any ideas?  Thanks
> Jason Shohet 
> 
> 
> 


Relevant Pages

  • Re: Business Objects / COM+ / MTS
    ... could be two seperate assemblies made available through .net remoting. ... CF> multiple web services using Microsoft and .Net. ... wsUpdateChecking- this webservice will update the amount ... If either call failed, the entire transaction ...
    (microsoft.public.dotnet.distributed_apps)
  • Business Objects / COM+ / MTS
    ... web services using Microsoft and .Net. ... wsUpdateSavings- this webservice will update the amount of money ... Given the requirements and the 2 webservices, how would this transaction ... would call wsUpdateChecking & wsUpdateSavings to manage the transaction? ...
    (microsoft.public.dotnet.distributed_apps)
  • Re: Business Objects / COM+ / MTS
    ... CF> I have a general question on how to implement transactions across ... wsUpdateChecking- this webservice will update the amount ... this would require a call to wsUpdateChecking and a call to ... If either call failed, the entire transaction ...
    (microsoft.public.dotnet.distributed_apps)
  • Re: Transactional webservice
    ... ph is basically a connection to my webservice. ... I could do it as an atomic transaction, but I am not sure how to transmit ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Business Objects / COM+ / MTS
    ... Assuming that your transaction only involves database transactions (and not ... MSMQ transactions for instance) it doesn't really matter how many assemblies ... wsUpdateChecking- this webservice will update the amount ... this would require a call to wsUpdateChecking and a call to ...
    (microsoft.public.dotnet.distributed_apps)