N
nevin
Hi All,
I have a DataTier in a remoting object which at the moment caches a simple
db.
Clients request filtered data which is returned to them in a new dataset
which they display in a grid...all ok.
If I update one field of one row (never a primary key field) I do something
like:
BindingManagerBase bmb = this.BindingContext[grdMessages.DataSource,
grdMessages.DataMember];
DataRowView drv = bmb.Current as DataRowView;
// update the row
drv.Row["req_grp_ID"] = gid;
DataSet dsnew = ((DataSet)grdMessages.DataSource).GetChanges();
// send the updated row to the remoting server
ClientRequest.UpdateRequest(dsnew);
The server takes the dataset and merges it:
MainDataset.Merge(dsnew, true);
MainDataset.AcceptChanges();
The Client then makes a call to the remoting server to return again the
filtered data I want to view. Nothing changes in the client, and I still get
the old data back from the filtered dataset from the server.
I would have thought that as I'm not updating the database directly I would
be able to just merge the clients data into the servers cached dataset
AcceptChanges would then have the new data confirmed into the cached
dataset. Any subsequent filter commands on the cached dataset would include
the new client updates.
Why wouldn't it ?
I have a DataTier in a remoting object which at the moment caches a simple
db.
Clients request filtered data which is returned to them in a new dataset
which they display in a grid...all ok.
If I update one field of one row (never a primary key field) I do something
like:
BindingManagerBase bmb = this.BindingContext[grdMessages.DataSource,
grdMessages.DataMember];
DataRowView drv = bmb.Current as DataRowView;
// update the row
drv.Row["req_grp_ID"] = gid;
DataSet dsnew = ((DataSet)grdMessages.DataSource).GetChanges();
// send the updated row to the remoting server
ClientRequest.UpdateRequest(dsnew);
The server takes the dataset and merges it:
MainDataset.Merge(dsnew, true);
MainDataset.AcceptChanges();
The Client then makes a call to the remoting server to return again the
filtered data I want to view. Nothing changes in the client, and I still get
the old data back from the filtered dataset from the server.
I would have thought that as I'm not updating the database directly I would
be able to just merge the clients data into the servers cached dataset
AcceptChanges would then have the new data confirmed into the cached
dataset. Any subsequent filter commands on the cached dataset would include
the new client updates.
Why wouldn't it ?