指定的offlineSchema与先前用于缓存路径的数据库脱机模式不匹配

时间:2013-11-28 16:46:52

标签: c# windows-runtime microsoft-sync-framework

我已经从Fabrikam示例(https://syncwinrt.codeplex.com/)实现了WinRt同步框架。框架工作创建本地数据库,并在我第一次运行应用程序并同步时正常工作。当我重新运行应用程序时,它会抛出一个错误。

异常详细信息:

System.ArgumentException未被用户代码处理   的HResult = -2147024809   Message =指定的offlineSchema与先前用于缓存路径的数据库脱机模式不匹配   来源= Microsoft.Synchronization.ClientServices.Win8   堆栈跟踪:        在Microsoft.Synchronization.ClientServices.SQLite.SQLiteContext.CheckSchemaAndUri(OfflineSchema offlineSchema,Uri uri,String scope)        在Microsoft.Synchronization.ClientServices.SQLite.SQLiteContext.LoadSchema()        在Microsoft.Synchronization.ClientServices.SQLite.SQLiteContext.d__0.MoveNext()     ---从抛出异常的先前位置开始的堆栈跟踪结束---        在System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务任务)        在System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)        在System.Runtime.CompilerServices.TaskAwaiter 1.GetResult() at mySync.ContextModel.ContextModel.<Sync>d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter 1.GetResult()        at my_Windows_App.App.d__4.MoveNext()   InnerException:

提前感谢任何帮助。

1 个答案:

答案 0 :(得分:0)

我的数据库有名称以大写字母开头的表格。以小写重命名它们对我来说是个窍门。