Chris,
The problem here is the FTP site. You will have to write some sort of
transaction management for this. Unfortunately, doing something of this
nature is rather tricky. For example, say you write the file to FTP, but
the database insert fails. Then you have to delete the file on the FTP
site. What if you do the reverse?
All-in-all, unless you have an existing resource manager for the FTP
site (which I doubt), then I would consider another option. There are too
many things to take into account (what if the network fails in the middle?
How can you roll back then? Things of that nature).
If you are really serious about doing this the proper way, I would look
into creating a resource manager for FTPing, and then use COM+ to handle the
transaction.
What would be more helpful was if there was a transaction manager on the
FTP machine you want to delete the file from. That way, you could get a
true distributed transaction.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard. caspershouse.co m
"Chris Fink" <Ch*******@disc ussions.microso ft.com> wrote in message
news:D5******** *************** ***********@mic rosoft.com...
I have the need to perform an atomic operation in two systems, a database
and
an ftp site. The process is two step; 1. insert a row into oracle, 2.
delete
a file from a remote ftp site. I need to make these steps atomic...either
they both succeed or both fail. Any suggestions on how I create a
transaction that bridges these two steps (systems) using C#?
Thanks in advance!