I am using the local database cache to synchronize SQL Server 2008 with a SQL Server Compact Database in a windows form application. I have it set to download the entire table each time and the create option is set to DropExisitingOrCreateNewTable.
The sync works about 2 out of 3 times but when it fails I receive the following error. Does anyone have any ideas on why or how to fix it.
Unable to initialize the client database, because the schema for table 'tblProfitScan' could not be retrieved by the GetSchema() method of DbServerSyncProvider. Make sure that you can establish a connection to the client database and that either the SelectIncrementalInsertsCommand
property or the SelectIncrementalUpdatesCommand property of the SyncAdapter is specified correctly.
at Microsoft.Synchronization.Data.Server.DbServerSyncProvider.GetSchema(Collection`1 tableNames, SyncSession syncSession)
at Microsoft.Synchronization.SyncAgent.InitClientSchema()
at Microsoft.Synchronization.SyncAgent.DataSynchronize()
at Microsoft.Synchronization.SyncAgent.Synchronize()
at ProfitScan.Form1.bgwUpdateProductList_DoWork(Object sender, DoWorkEventArgs e) in C:\Users\sdavis\Desktop\ProfitScan\ProfitScan\Form1.cs:line 452
at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)