Results 1 to 2 of 2

Thread: Filestream Concurrently issue

  1. #1

    Thread Starter
    Fanatic Member popskie's Avatar
    Join Date
    Jul 2005
    Location
    In my chair
    Posts
    666

    Filestream Concurrently issue

    hi,
    It is posible to write to file concurrently using File method or Streamwrite?
    If so, how?

    Thanks,

    Popskie

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Filestream Concurrently issue

    Depending on how you open it in the first place a FileStream can be read-only, write-only or read/write. That means that you can read and write to the same file using a single stream. What you cannot do is open multiple streams on a single file if any of them have write access. You can open as many read-only FileStreams on the same file as you like but if you want to open a write-only or read/write stream on a file it MUST be the only stream open on that file. If you try to open a second stream on a file that already has an open writable stream or you try to open a writable stream on a file that already has any open stream an exception will be thrown.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width