Asked by:
FireBird DB and SyncFx getting type missmatch.

Question
-
Hello,
I need help with SyncFx for synchronizing 2 Firebird embedded DBs.
I did set up the provider and created syncAdapters for my tables, but when I change some data I get an Microsoft.Synchronization.Data.DbMetadataSyncException.
'ImageAnalyzer.vshost.exe' (CLR v4.0.30319: ImageAnalyzer.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\mscorlib.resources\v4.0_4.0.0.0_de_b77a5c561934e089\mscorlib.resources.dll'. Module was built without symbols. Exception thrown: 'Microsoft.Synchronization.Data.DbMetadataSyncException' in Microsoft.Synchronization.dll bei Microsoft.Synchronization.Data.SyncRowMetadata.InitMetadata(DbSyncAdapter adapter, DbSyncStage stage) bei Microsoft.Synchronization.Data.SyncRowMetadata..ctor(DataRow row, DbSyncAdapter adapter, DbSyncStage stage, Boolean isLocal) bei Microsoft.Synchronization.Data.DbChangeHandler.ReadLocalRowMetadata(DataRow row) bei Microsoft.Synchronization.Data.DbChangeHandler.ApplyUpdate() bei Microsoft.Synchronization.Data.ChangeHandlerBase.ApplyChange(FailedDeleteDelegate_type failedDeleteDelegate) bei Microsoft.Synchronization.Data.RelationalSyncProvider.ApplyChangesInternal(DbSyncScopeMetadata scopeMetadata, IDbTransaction transaction, FailedDeleteDelegate_type failedDeleteDelegate, DataSet dataSet, ChangeApplicationType applyType) bei Microsoft.Synchronization.Data.RelationalSyncProvider.ApplyChanges(DbSyncScopeMetadata scopeMetadata, IDbTransaction applyTransaction, DataSet dataSet, DbSyncSession DbSyncSession, Boolean commitTransaction, FailedDeleteDelegate_type failedDeleteDelegate, String batchFileName, ChangeApplicationAction& action) bei Microsoft.Synchronization.Data.RelationalSyncProvider.SingleTransactionApplyChangesAdapter.Apply(DataSet dataSet, Boolean commitTransaction, FailedDeleteDelegate_type failedDeleteDelegate, String batchFileName, ChangeApplicationAction& action) bei Microsoft.Synchronization.Data.RelationalSyncProvider.ApplyChanges(DbSyncScopeMetadata scopeMetadata, DataSet dataSet, DbSyncSession dbSyncSession, Boolean commitTransaction) bei Microsoft.Synchronization.Data.RelationalSyncProvider.ProcessChangeBatch(ConflictResolutionPolicy resolutionPolicy, ChangeBatch sourceChanges, Object changeDataRetriever, SyncCallbacks syncCallbacks, SyncSessionStatistics sessionStatistics) bei Microsoft.Synchronization.KnowledgeProviderProxy.ProcessChangeBatch(CONFLICT_RESOLUTION_POLICY resolutionPolicy, ISyncChangeBatch pSourceChangeManager, Object pUnkDataRetriever, ISyncCallback pCallback, _SYNC_SESSION_STATISTICS& pSyncSessionStatistics) bei Microsoft.Synchronization.CoreInterop.ISyncSession.Start(CONFLICT_RESOLUTION_POLICY resolutionPolicy, _SYNC_SESSION_STATISTICS& pSyncSessionStatistics) bei Microsoft.Synchronization.KnowledgeSyncOrchestrator.DoOneWaySyncHelper(SyncIdFormatGroup sourceIdFormats, SyncIdFormatGroup destinationIdFormats, KnowledgeSyncProviderConfiguration destinationConfiguration, SyncCallbacks DestinationCallbacks, ISyncProvider sourceProxy, ISyncProvider destinationProxy, ChangeDataAdapter callbackChangeDataAdapter, SyncDataConverter conflictDataConverter, Int32& changesApplied, Int32& changesFailed) bei Microsoft.Synchronization.KnowledgeSyncOrchestrator.DoOneWayKnowledgeSync(SyncDataConverter sourceConverter, SyncDataConverter destinationConverter, SyncProvider sourceProvider, SyncProvider destinationProvider, Int32& changesApplied, Int32& changesFailed) bei Microsoft.Synchronization.KnowledgeSyncOrchestrator.Synchronize() bei Microsoft.Synchronization.SyncOrchestrator.Synchronize() bei ImageAnalyzer.app.SynchronizException thrown: 'Microsoft.Synchronization.Data.DbMetadataSyncException' in ImageAnalyzer.exe 'ImageAnalyzer.vshost.exe' (CLR v4.0.30319: ImageAnalyzer.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Transactions.resources\v4.0_4.0.0.0_de_b77a5c561934e089\System.Transactions.resources.dll'. Module was built without symbols. System.Transactions Critical: 0 : <TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Critical"><TraceIdentifier>http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled</TraceIdentifier><Description>Unbehandelte Ausnahme</Description><AppDomain>ImageAnalyzer.vshost.exe</AppDomain><Exception><ExceptionType>Microsoft.Synchronization.Data.DbMetadataSyncException, Microsoft.Synchronization.Data, Version=3.1.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91</ExceptionType><Message>The row timestamp data type or value for column 'sync_update_peer_timestamp' is not valid. The column should be one of the following types: 'Int64','UInt64', 'Int32', 'UInt32', 'byte[8]' or a numeric string that can be converted to UInt64.</Message><StackTrace> bei Microsoft.Synchronization.Data.SyncRowMetadata.InitMetadata(DbSyncAdapter adapter, DbSyncStage stage) bei Microsoft.Synchronization.Data.SyncRowMetadata..ctor(DataRow row, DbSyncAdapter adapter, DbSyncStage stage, Boolean isLocal) bei Microsoft.Synchronization.Data.DbChangeHandler.ReadLocalRowMetadata(DataRow row) bei Microsoft.Synchronization.Data.DbChangeHandler.ApplyUpdate() bei Microsoft.Synchronization.Data.ChangeHandlerBase.ApplyChange(FailedDeleteDelegate_type failedDeleteDelegate) bei Microsoft.Synchronization.Data.RelationalSyncProvider.ApplyChangesInternal(DbSyncScopeMetadata scopeMetadata, IDbTransaction transaction, FailedDeleteDelegate_type failedDeleteDelegate, DataSet dataSet, ChangeApplicationType applyType) bei Microsoft.Synchronization.Data.RelationalSyncProvider.ApplyChanges(DbSyncScopeMetadata scopeMetadata, IDbTransaction applyTransaction, DataSet dataSet, DbSyncSession DbSyncSession, Boolean commitTransaction, FailedDeleteDelegate_type failedDeleteDelegate, String batchFileName, ChangeApplicationAction&amp; action) bei Microsoft.Synchronization.Data.RelationalSyncProvider.SingleTransactionApplyChangesAdapter.Apply(DataSet dataSet, Boolean commitTransaction, FailedDeleteDelegate_type failedDeleteDelegate, String batchFileName, ChangeApplicationAction&amp; action) bei Microsoft.Synchronization.Data.RelationalSyncProvider.ApplyChanges(DbSyncScopeMetadata scopeMetadata, DataSet dataSet, DbSyncSession dbSyncSession, Boolean commitTransaction) bei Microsoft.Synchronization.Data.RelationalSyncProvider.ProcessChangeBatch(ConflictResolutionPolicy resolutionPolicy, ChangeBatch sourceChanges, Object changeDataRetriever, SyncCallbacks syncCallbacks, SyncSessionStatistics sessionStatistics) bei Microsoft.Synchronization.KnowledgeProviderProxy.ProcessChangeBatch(CONFLICT_RESOLUTION_POLICY resolutionPolicy, ISyncChangeBatch pSourceChangeManager, Object pUnkDataRetriever, ISyncCallback pCallback, _SYNC_SESSION_STATISTICS&amp; pSyncSessionStatistics) bei Microsoft.Synchronization.CoreInterop.ISyncSession.Start(CONFLICT_RESOLUTION_POLICY resolutionPolicy, _SYNC_SESSION_STATISTICS&amp; pSyncSessionStatistics) bei Microsoft.Synchronization.KnowledgeSyncOrchestrator.DoOneWaySyncHelper(SyncIdFormatGroup sourceIdFormats, SyncIdFormatGroup destinationIdFormats, KnowledgeSyncProviderConfiguration destinationConfiguration, SyncCallbacks DestinationCallbacks, ISyncProvider sourceProxy, ISyncProvider destinationProxy, ChangeDataAdapter callbackChangeDataAdapter, SyncDataConverter conflictDataConverter, Int32&amp; changesApplied, Int32&amp; changesFailed) bei Microsoft.Synchronization.KnowledgeSyncOrchestrator.DoOneWayKnowledgeSync(SyncDataConverter sourceConverter, SyncDataConverter destinationConverter, SyncProvider sourceProvider, SyncProvider destinationProvider, Int32&amp; changesApplied, Int32&amp; changesFailed) bei Microsoft.Synchronization.KnowledgeSyncOrchestrator.Synchronize() bei Microsoft.Synchronization.SyncOrchestrator.Synchronize() bei ImageAnalyzer.app.SynchronizationHelper.SynchronizeProviders(RelationalSyncProvider localProvider, RelationalSyncProvider remoteProvider) in D:\ImageAnalyzer\ImageAnalyzer\ImageAnalyzer\app\SynchronizationHelper.cs:Zeile 32. bei ImageAnalyzer.Form1.syncButton_Click(Object sender, EventArgs e) in D:\ImageAnalyzer\ImageAnalyzer\ImageAnalyzer\app\Form1.cs:Zeile 83. bei System.Windows.Forms.Control.OnClick(EventArgs e) bei System.Windows.Forms.Button.OnClick(EventArgs e) bei System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) bei System.Windows.Forms.Control.WmMouseUp(Message&amp; m, MouseButtons button, Int32 clicks) bei System.Windows.Forms.Control.WndProc(Message&amp; m) bei System.Windows.Forms.ButtonBase.WndProc(Message&amp; m) bei System.Windows.Forms.Button.WndProc(Message&amp; m) bei System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) bei System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&amp; msg) bei System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData) bei System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) bei System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) bei ImageAnalyzer.Program.Main() in D:\ImageAnalyzer\ImageAnalyzer\ImageAnalyzer\app\Program.cs:Zeile 19. bei System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) bei System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) bei Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) bei System.Threading.ThreadHelper.ThreadStart()</StackTrace><ExceptionString>Microsoft.Synchronization.Data.DbMetadataSyncException: The row timestamp data type or value for column 'sync_update_peer_timestamp' is not valid. The column should be one of the following types: 'Int64','UInt64', 'Int32', 'UInt32', 'byte[8]' or a numeric string that can be converted to UInt64. bei Microsoft.Synchronization.Data.SyncRowMetadata.InitMetadata(DbSyncAdapter adapter, DbSyncStage stage) bei Microsoft.Synchronization.Data.SyncRowMetadata..ctor(DataRow row, DbSyncAdapter adapter, DbSyncStage stage, Boolean isLocal) bei Microsoft.Synchronization.Data.DbChangeHandler.ReadLocalRowMetadata(DataRow row) bei Microsoft.Synchronization.Data.DbChangeHandler.ApplyUpdate() bei Microsoft.Synchronization.Data.ChangeHandlerBase.ApplyChange(FailedDeleteDelegate_type failedDeleteDelegate) bei Microsoft.Synchronization.Data.RelationalSyncProvider.ApplyChangesInternal(DbSyncScopeMetadata scopeMetadata, IDbTransaction transaction, FailedDeleteDelegate_type failedDeleteDelegate, DataSet dataSet, ChangeApplicationType applyType) bei Microsoft.Synchronization.Data.RelationalSyncProvider.ApplyChanges(DbSyncScopeMetadata scopeMetadata, IDbTransaction applyTransaction, DataSet dataSet, DbSyncSession DbSyncSession, Boolean commitTransaction, FailedDeleteDelegate_type failedDeleteDelegate, String batchFileName, ChangeApplicationAction&amp; action) bei Microsoft.Synchronization.Data.RelationalSyncProvider.SingleTransactionApplyChangesAdapter.Apply(DataSet dataSet, Boolean commitTransaction, FailedDeleteDelegate_type failedDeleteDelegate, String batchFileName, ChangeApplicationAction&amp; action) bei Microsoft.Synchronization.Data.RelationalSyncProvider.ApplyChanges(DbSyncScopeMetadata scopeMetadata, DataSet dataSet, DbSyncSession dbSyncSession, Boolean commitTransaction) bei Microsoft.Synchronization.Data.RelationalSyncProvider.ProcessChangeBatch(ConflictResolutionPolicy resolutionPolicy, ChangeBatch sourceChanges, Object changeDataRetriever, SyncCallbacks syncCallbacks, SyncSessionStatistics sessionStatistics) bei Microsoft.Synchronization.KnowledgeProviderProxy.ProcessChangeBatch(CONFLICT_RESOLUTION_POLICY resolutionPolicy, ISyncChangeBatch pSourceChangeManager, Object pUnkDataRetriever, ISyncCallback pCallback, _SYNC_SESSION_STATISTICS&amp; pSyncSessionStatistics) bei Microsoft.Synchronization.CoreInterop.ISyncSession.Start(CONFLICT_RESOLUTION_POLICY resolutionPolicy, _SYNC_SESSION_STATISTICS&amp; pSyncSessionStatistics) bei Microsoft.Synchronization.KnowledgeSyncOrchestrator.DoOneWaySyncHelper(SyncIdFormatGroup sourceIdFormats, SyncIdFormatGroup destinationIdFormats, KnowledgeSyncProviderConfiguration destinationConfiguration, SyncCallbacks DestinationCallbacks, ISyncProvider sourceProxy, ISyncProvider destinationProxy, ChangeDataAdapter callbackChangeDataAdapter, SyncDataConverter conflictDataConverter, Int32&amp; changesApplied, Int32&amp; changesFailed) bei Microsoft.Synchronization.KnowledgeSyncOrchestrator.DoOneWayKnowledgeSync(SyncDataConverter sourceConverter, SyncDataConverter destinationConverter, SyncProvider sourceProvider, SyncProvider destinationProvider, Int32&amp; changesApplied, Int32&amp; changesFailed) bei Microsoft.Synchronization.KnowledgeSyncOrchestrator.Synchronize() bei Microsoft.Synchronization.SyncOrchestrator.Synchronize() bei ImageAnalyzer.app.SynchronizationHelper.SynchronizeProviders(RelationalSyncProvider localProvider, RelationalSyncProvider remoteProvider) in D:\ImageAnalyzer\ImageAnalyzer\ImageAnalyzer\app\SynchronizationHelper.cs:Zeile 32. bei ImageAnalyzer.Form1.syncButton_Click(Object sender, EventArgs e) in D:\ImageAnalyzer\ImageAnalyzer\ImageAnalyzer\app\Form1.cs:Zeile 83. bei System.Windows.Forms.Control.OnClick(EventArgs e) bei System.Windows.Forms.Button.OnClick(EventArgs e) bei System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) bei System.Windows.Forms.Control.WmMouseUp(Message&amp; m, MouseButtons button, Int32 clicks) bei System.Windows.Forms.Control.WndProc(Message&amp; m) bei System.Windows.Forms.ButtonBase.WndProc(Message&amp; m) bei System.Windows.Forms.Button.WndProc(Message&amp; m) bei System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) bei System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&amp; msg) bei System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData) bei System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) bei System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) bei ImageAnalyzer.Program.Main() in D:\ImageAnalyzer\ImageAnalyzer\ImageAnalyzer\app\Program.cs:Zeile 19. bei System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) bei System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) bei Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) bei System.Threading.ThreadHelper.ThreadStart()</ExceptionString></Exception></TraceRecord> ationHelper.SynchronizeProviders(RelationalSyncProvider localProvider, RelationalSyncProvider remoteProvider) in D:\ImageAnalyzer\ImageAnalyzer\ImageAnalyzer\app\SynchronizationHelper.cs:Zeile 26.
The exception message states:
Additional information: The row timestamp data type or value for column 'sync_update_peer_timestamp' is not valid.
The column should be one of the following types: 'Int64','UInt64', 'Int32', 'UInt32', 'byte[8]'
or a numeric string that can be converted to UInt64.My problem is that I don't know where to search for the error, the exception doesn't tell me where in the code or at which DBCommand the missmatch happens. I don't even use the "timestamp" data type so I think SyncFx is using it internally and thats why I get the exception when calling my stored procedure.
I did utilize the code example from here (github. com/brianpos/FirebirdSync) and that worked fine with the Integer data type, so it has to be on my end.
Can someone guide me to where to track down that error? Do I need to use the "Timestamp" data type for the metadata columns in my tracking tables?
I am using SyncFx 2.1 with the currend (2.5.5) .net connector for FireBird.
I am really lost atm, hope someone can help me. Greets,
Saladino
Monday, April 18, 2016 12:04 PM