Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / October 2004

Tip: Looking for answers? Try searching our database.

Databases Synchronization with Web Services

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Amar - 07 Oct 2004 09:02 GMT
Can someone give me an answer to this please.

I want to run some SQL commands within my page to a local database,
after that call a webservice that runs other SQL commands to another
database and i want to be able to control all these commands in case
something goes wrong to rollback everything. For example

Scenario within my aspx page
---------------------------------
Insert Into LocalDatabase
Update LocalDatabase
Insert Into LocalDatabase
Insert within WebService
Insert within WebService

If Locals OK and WebService OK Commit Both else RollBack Both
---------------------------------

I believe you understand what i want to achieve, i have read about
WS-Coordination, WS-AtomicTransaction etc but if i have understand
right these are not availble yet, if yes when they will be out?
Is there any other way to succeed this now?
Thanks in advance,
Cowboy (Gregory A. Beamer) - MVP - 07 Oct 2004 14:59 GMT
You can do this currently without the WS enhancements, but you have to think
it through. The basic system is this:

1. Client side starts a transaction and changes the datababase
2. Client contacts server via a web service
3. Server initiates a transaction and makes changes to its database

To work, the condition then goes
a) Server succeeds and sends back a success and the client commits
b) Server sends back a failure and the client rolls back

The only thing missing here is the dual commit (ie, the server succeeds, but
the client cannot commit). As the client has already put the information,
wrapped in a transaction, in the database (provisionally), that should not
happen. The commit failing would only likely happen in a catestrophic failure.

Now, there are better modes for the long run, but you can institute this
today.

---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************

> Can someone give me an answer to this please.
>
[quoted text clipped - 19 lines]
> Is there any other way to succeed this now?
> Thanks in advance,

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.