|
-
Mar 4th, 2012, 11:03 PM
#1
Thread Starter
New Member
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.
-
Mar 4th, 2012, 11:36 PM
#2
Re: Mulit-user database question
 Originally Posted by donaldl43
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 
-
Mar 5th, 2012, 10:02 AM
#3
Thread Starter
New Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|