Is it possible to apply a DbSyncScopeDescription to an existing SqlCeDatabase?
I'm trying to provision an existing database using a DbSyncScopeDescription built from this database.
This is the code i'm using to test this out. This should give you an idea of what I'm trying to do.
I get a SqlCeException on the last line with the message:
"The specified index does not exist. [ sysChangeTxBsn_idx ]".
private void Test()
{
DbSyncScopeDescription scopeDescription =
new DbSyncScopeDescription("MyScope");
foreach (string tableName in TableNames)
{
DbSyncTableDescription tableDecsription = SqlCeSyncDescriptionBuilder
.GetDescriptionForTable(tableName, myConnection);
scopeDescription.Tables.Add(tableDecsription);
}
SqlCeSyncScopeProvisioning scopeProvisioning =
new SqlCeSyncScopeProvisioning(scopeDescription);
scopeProvisioning.SetCreateTableDefault(DbSyncCreationOption.Create);
scopeProvisioning.Apply(myConnection);
}
Please let me know if this is possible or if I'm doing something wrong. Thank you, Alex