Updating one column when a row has changes, DMS 1.2.0 #1303
Replies: 1 comment 4 replies
-
Are you able to provide a small repro sample, that I can use to reproduce the error ? By the way,
So, the two call are normals. The difference is that the second call contains only rows with only the primary key. Anyway, even if it's working, your scenario will not eventually. If you really want to add this the Here a small piece of code I used to test with agent.RemoteOrchestrator.OnRowsChangesApplying(args =>
{
if (args.SchemaTable.TableName != "ProductCategory")
return;
if (args.SyncRows.Count > 0)
{
foreach (var row in args.SyncRows)
{
if (row.RowState != SyncRowState.Modified)
continue;
row["ModifiedDate"] = DateTime.UtcNow;
}
}
}); |
Beta Was this translation helpful? Give feedback.
-
When a row on the client has changed, I have a LastUpdated timestamp that I need to update on the server. I'm close, but it's failing for some reason. In this case I have one row on the client with one change.
The RemoteOrchestrator.OnTableChangesApplying executes twice, which I don't understand. It's the second time that throws an exception.
Here's my code:
The exception on the second loop call is
I'm suspecting maybe that the problem that it's changed mid transaction or that I'm changing it on the server, but not on the client? But I'm not sure how to do this.
Any suggestions would be very welcome. TIA.
Beta Was this translation helpful? Give feedback.
All reactions