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