Results 1 to 3 of 3

Thread: Mulit-user database question

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2011
    Posts
    8

    Mulit-user database question

    I've written a program for work that uses a MySQL database. I currently read and write directly to the database instead of using a dataadapter.

    I am thinking of porting over to use a dataadapter but I'm curious about one thing.

    If 2 users are working on the same database and table and if one of them makes a change will the changes be reflected immediately to the other user?

    I think using a dataadapter would be preferable to what I'm doing but I want to make sure the data doesn't get stale.

    Anyone who can answer this? Thanks in advance.

  2. #2
    Frenzied Member
    Join Date
    Jan 2006
    Posts
    1,875

    Re: Mulit-user database question

    Quote Originally Posted by donaldl43 View Post
    If 2 users are working on the same database and table and if one of them makes a change will the changes be reflected immediately to the other user?

    Changes done by one user will not be reflected back to other user unless it gets loaded again from the database........may be you can use one datetime column in you table which will store the last modified datetime (GetDate()) and always compare this column's value of edited record with the value store in table....and if both value are not same you can inform user that this record is already been updated and he need to reload the record before updating the same.
    __________________
    Rate the posts that helped you

  3. #3

    Thread Starter
    New Member
    Join Date
    May 2011
    Posts
    8

    Re: Mulit-user database question

    Thanks riteshjain1982. I suppose I could also do that if I keep it the way it is. I was hoping the changes would be updated in the dataadapter but I guess it makes sense that it wouldn't.

Tags for this Thread

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