Results 1 to 10 of 10

Thread: Concept Help

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2012
    Posts
    440

    Concept Help

    I have small business application which several employees will use.

    On this application i'll have a "shared" notepad. the contents will be in shared text file saved on a network drive.

    I was thinking of using a stream reader to read it's contents every 15 seconds.

    When a user has edited something i'll save it using stream writer.

    Can anyone think of any issues using this system? is there a better way

    One thought I had was what would happen if one user was reading the file and someone else tried to write it. Would that throw and error?

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

    Re: Concept Help

    The obvious issue is two users making changes at the same time. Exactly how much text are you talking about?
    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

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2012
    Posts
    440

    Re: Concept Help

    That's another very obvious issue I hadn't considered.
    I'm talking about small notes, 5-15 words max per note.

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

    Re: Concept Help

    That sounds more like a job for a database. You can then take advantage of the in-built concurrency support in ADO.NET.
    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

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2012
    Posts
    440

    Re: Concept Help

    I wanted to minimise database use.

    What if each user had thier own file, I would order each file by last date edited and read each file in that order?

    maybe also limit each users filesize?

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

    Re: Concept Help

    Quote Originally Posted by ubkra View Post
    I wanted to minimise database use.
    For what reason, may I ask? Maybe it's legitimate but maybe it's misguided. I'd certainly much rather use a database than files for this.
    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

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2012
    Posts
    440

    Re: Concept Help

    Just worried about using to many tables (getting access was a big favour)

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

    Re: Concept Help

    Define "too may" tables. I would expect that this would take one, maybe two tables. Anyway, it really doesn't matter how many tables you use. What matters is how many records you have in them.
    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

  9. #9

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2012
    Posts
    440

    Re: Concept Help

    I've been given access to a database which is largely used for other purposes. They gave me permission based on using 3 tables and have agreed on another 10 tables. I’m a little concerned about asking for more

    What table structure would you use?

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

    Re: Concept Help

    I can't say exactly what schema is appropriate because I don't know exactly what you need to store but it would only take one table to store these notes.
    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