0
votes

I'm currently trying to implement Microsoft Sync Framework for field agents that will be working mostly disconnected from the server.

Currently I have a SQL Express database the application points to for offline mode and when they are back online, They can hit a sync button to push the changes up and down.

I have no problems creating the filtered scope, But our schema uses a "VersionID" column to handle historical data.

No data is deleted from the databases, so when a row is "updated" a new row is inserted with max(VersionID) + 1 as its new versionID.

Since I can't use aggregate functions in a filtered scope, I can't figure out how to retrieve the max version only for each unique row.

I only need to retrieve the max(versionID) record because of the 10GB limit for the database, I can't possibly download all records without going over the limit with all the support tables the application requires.

Any ideas?

1
"I can't use aggregate functions in a filtered scope". Why? - Ark-kun
Aggregate functions are not allowed within a filtered scope. So I can't use them - user853139

1 Answers

0
votes

the scope filter is simply appended to the _selectchanges SP's WHERE clause. If you can put your condition in a simple query, you should be able to set the same as the scope filter.