Hi all,
I use Sync framework to synchronize two SQL Server 2008 databases.
One of the tables from one side contains decimal columns with precision 38. Sync process throws an error:
Conversion overflows.
at System.Data.SqlClient.SqlBuffer.get_Decimal()
at System.Data.SqlClient.SqlBuffer.get_Value()
at System.Data.SqlClient.SqlDataReader.GetValueInternal(Int32 i)
at System.Data.SqlClient.SqlDataReader.GetValue(Int32 i)
at Microsoft.Synchronization.Data.DbDataReaderHandler.SetRemainingColumns(DataRow row, IDataReader reader)
at Microsoft.Synchronization.Data.DbDataReaderHandler.PopulateFullRow(IDataReader reader, DataRow row, RowEnumerationState state)
at Microsoft.Synchronization.Data.RelationalSyncProvider.EnumerateChangesInternal(DbSyncScopeMetadata scopeMetadata)
at Microsoft.Synchronization.Data.RelationalSyncProvider.GetChanges(DbSyncScopeMetadata scopeMetadata, DbSyncSession DbSyncSession, UInt32 memoryBatchSize)
at Microsoft.Synchronization.Data.RelationalSyncProvider.GetChangeBatch(UInt32 batchSize, SyncKnowledge destinationKnowledge, Object& changeDataRetriever)
at Microsoft.Synchronization.KnowledgeProviderProxy.GetChangeBatch(UInt32 dwBatchSize, ISyncKnowledge pSyncKnowledge, ISyncChangeBatch& ppChangeBatch, Object& ppUnkDataRetriever)
It is a known problem for sql data adapters that they can use only decimals with precision 28. However, we are not able to change column precision. I know that while loading with data adapters ReturnProviderSpecificTypes flag can be used, however we are
unable to intercept this while using sync framework.
Is there a way how we can cheat the synchronizer? I have tried to put converters but the exception is thrown before there is any converter involvement.
Thanks in advance!