RE: how to use Begintransaction ?
From: Cowboy (Gregory A. Beamer) - MVP (NoSpamMgbworld_at_comcast.netNoSpamM)
Date: 12/28/04
- Next message: Steve C. Orr [MVP, MCSD]: "Re: Custom Validation with client and server side functions"
- Previous message: John Saunders: "Re: Best way to pass variable between page and control"
- Messages sorted by: [ date ] [ thread ]
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 > > >
- Next message: Steve C. Orr [MVP, MCSD]: "Re: Custom Validation with client and server side functions"
- Previous message: John Saunders: "Re: Best way to pass variable between page and control"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|