simultaneous access to flat file

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Frank

    simultaneous access to flat file

    Hello all,
    I have to access a flat file (.txt or something) by two applications at the
    same time. For reading and writing. Is that possible and how?
    Thanks
    Frank


  • Frank

    #2
    Re: simultaneous access to flat file

    I thought of something. Is it possible with an XML file?
    Frank

    "Frank" <franknews@advi tronic.nlwrote in message
    news:12hlhopb79 c1m76@corp.supe rnews.com...
    Hello all,
    I have to access a flat file (.txt or something) by two applications at
    the same time. For reading and writing. Is that possible and how?
    Thanks
    Frank
    >

    Comment

    • Samuel R. Neff

      #3
      Re: simultaneous access to flat file


      A text file should be fine, if both processes open it with shared
      write access (or read/write) then they can both write to it (or read).
      If it's a simple file like a log file then it should be ok but you
      could get occasional hiccups where text from one write is in the
      middle of another unless you use some type of cross process
      synchronization (i.e., Mutex).

      XML is different though.. because XML has to be well formed it would
      be very difficult to have to applications both write to the same file
      and ensure that the resulting file is still well-formed after every
      write. You'd need to synchronize the processes and whenever one wrote
      to the file it triggered the other to read the changes and sync it's
      internal structure. It'd be far more reliable to have only one of the
      processes actually read/write the file and the second process can
      communicate back with the first to interact with it (Remoting).

      HTH,

      Sam


      ------------------------------------------------------------
      We're hiring! B-Line Medical is seeking Mid/Sr. .NET
      Developers for exciting positions in medical product
      development in MD/DC. Work with a variety of technologies
      in a relaxed team environment. See ads on Dice.com.



      On Wed, 27 Sep 2006 20:51:40 +0200, "Frank" <franknews@advi tronic.nl>
      wrote:
      >I thought of something. Is it possible with an XML file?
      >Frank
      >
      >"Frank" <franknews@advi tronic.nlwrote in message
      >news:12hlhopb7 9c1m76@corp.sup ernews.com...
      >Hello all,
      >I have to access a flat file (.txt or something) by two applications at
      >the same time. For reading and writing. Is that possible and how?
      >Thanks
      >Frank
      >>
      >

      Comment

      Working...