If the database call fails then nothing is updated into the file system, however if the file update fails then the database transaction is rolled back.
The above approach has to be done for the reason that the file update does not participate with the DTC.
But what if this we are dealing with multiple files, or any other complex scenario?
This is an article one of my friends (Mihidum) forwarded me about NTFS file system transaction,
here is the link.
Too bad, .Net does not support this, and we have to write unmanaged code.