--- Yves Goergen <[EMAIL PROTECTED]> wrote:
> On 08.09.2007 21:06 CE(S)T, Joe Wilson wrote:
> > Are you able to store this file in the database itself as a BLOB?
> 
> No, its an input file that I'm processing and saving the results in the
> database. When processing and database import are successful, the file
> must be deleted so that it won't be imported again in a later run.

Just rename the file with a ".pending" suffix before the transaction.
If the transaction succeeds, delete the .pending file.
If the transaction fails, rename the .pending file back to its original name.

If you want to be thorough in the face of crashing, make a table of all 
processed file names. Update that table with each processed file name 
within the transaction. Upon program startup, consult the file name table 
to see if you have already processed that pending file, if so - delete 
the pending file, if not - repeat the transaction on the pending file.


       
____________________________________________________________________________________
Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for 
today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow  

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to