Dataset question
-
Hello, I'm programming an application for a multi user environment, so multiple users will work with different applications on the same database tables. Now, here's my problem. Lets say user A en user B start the application, and there local dataset is filled. Let's say user A changes row 1, automatically the application will save this in the application and in the database. But now user B doesn't have this latest info yet. How do i solve this? Nowadays it's working like this, each minute the application is getting the latest info from the database, and the datagrid is redrawn with the new latest info. but i would like to compare the current dataset for changes with the new dataset from the database. Is there an easy way to do this? thx
-
Hello, I'm programming an application for a multi user environment, so multiple users will work with different applications on the same database tables. Now, here's my problem. Lets say user A en user B start the application, and there local dataset is filled. Let's say user A changes row 1, automatically the application will save this in the application and in the database. But now user B doesn't have this latest info yet. How do i solve this? Nowadays it's working like this, each minute the application is getting the latest info from the database, and the datagrid is redrawn with the new latest info. but i would like to compare the current dataset for changes with the new dataset from the database. Is there an easy way to do this? thx
There's nothing you can do about what is shown on one clients screen while another is changing it, unless you lock records so only one person can have them at a time. I'd lock only when you get to a point of editing, and then users will find out someone beat them to it if they try to edit something that someone else has grabbed. The 1 minute refresh is basically a race condition, and a drain on your database server resources. Christian Graus - Microsoft MVP - C++