SqlCe 2005 データベースを SqlServer 2005 と同期するために SyncFramework 1.0 を使用しています。
このように同期アンカーを設定しています...
CommandText = "Select @sync_new_received_anchor = GETUTCDATE()",
ただし、syncframework はこの値を小数点以下の桁数が多すぎる文字列に変換します....
exec sp_executesql N'SELECT [Company], [ServiceAreaId], [CostCentreId], [DeletionDate], [DeletionId]
FROM [ServiceArea_CostCentre_Tombstone]
WHERE (@sync_initialized = 1
AND DeletionDate > @sync_last_received_anchor
AND DeletionDate <= @sync_new_received_anchor
AND DeletionId <> @sync_client_id)',
N'@sync_initialized bit,@sync_last_received_anchor datetime,
@sync_new_received_anchor datetime,@sync_client_id uniqueidentifier',
@sync_initialized=1,
@sync_last_received_anchor='2010-01-27 10:22:01.6770000', -- something wrong here!
@sync_new_received_anchor='2010-01-27 10:23:48.5500000',
@sync_client_id='04F8DB17-981A-4A66-9126-BB609342A2A5'
SQL サーバーが「データ型 varchar を datetime に変換中にエラーが発生しました」というエラーをログに記録します。文字列を DateTime に変換するときは、小数点以下 3 桁しか使用できないためです。
何が問題なのかわかりません!