S
Somebody
* I store application data in a SQL database
* I access it in my app via ADO.Net data table / table adapter
* I do not access any tables directly, its all stored procedures
* Since I am using WPF, I wrap most of the data in ObservableCollection<T>.
Basically what happens is that I grab data from the data base, store it in
local memory in ObservableCollection<T> collection objects and all is good.
The getters just return the data and the setters update the local copy of
the data and call stored procedures to update the database.
This all seems like it should work in a single user environment.
But what happens in a multi-user environment?
Lets say UserA updates something in the database, there doesn't seem to be
any way for UserB to see the changes without implementing some kind of
cheezy refresh button.
Also, what happens if UserA and UserB make conflicting changes?
I guess I need to implement some kind of locking mechanism? UserA checks out
ItemA and UserB can only get a read-only copy?
UserB will still eventually have to hit a refresh button?
Any way to get notifications from the database? Polling seems cheezy (and
wrong).
* I access it in my app via ADO.Net data table / table adapter
* I do not access any tables directly, its all stored procedures
* Since I am using WPF, I wrap most of the data in ObservableCollection<T>.
Basically what happens is that I grab data from the data base, store it in
local memory in ObservableCollection<T> collection objects and all is good.
The getters just return the data and the setters update the local copy of
the data and call stored procedures to update the database.
This all seems like it should work in a single user environment.
But what happens in a multi-user environment?
Lets say UserA updates something in the database, there doesn't seem to be
any way for UserB to see the changes without implementing some kind of
cheezy refresh button.
Also, what happens if UserA and UserB make conflicting changes?
I guess I need to implement some kind of locking mechanism? UserA checks out
ItemA and UserB can only get a read-only copy?
UserB will still eventually have to hit a refresh button?
Any way to get notifications from the database? Polling seems cheezy (and
wrong).