- You configure merge replication in Microsoft SQLServer 2008 R2, in Microsoft SQLServer2008, or in Microsoft SQLServer 2005.
- The publication contains a table article.
- The table article contains columns of data type varchar or nvarchar.
Note The table article may contain columns of both data types.
- The table article also contains a column of data type decimal.
Note The table may also contain a column of data type numeric or money.
- Acolumn of data type uniqueidentifier that has the Rowguidcol property is not the last column in the table. For example, a column of data type decimal, numeric, or money is sorted after the uniqueidentifier column.
- You configure the table article to use a stored procedure custom conflictresolver.
- A conflict is detected for the table article.
Error message 1
Restart the Merge Agent to apply the DDL changes and synchronize the subscription.
Invalid character value for cast specification.
Note These errors are reported by the merge agent if the merge agent job fails.
Note The stored procedure returns the correct data.
Note The error message that you receive depends on the table definition. You may have to try variations of these methods to work around the issue.
To work around this issue, cast the columns of data type varchar to data type char in the stored procedure custom conflict resolver code.
Method 2To work around this issue, change the column order in the underlying table. For example, change the column order so that the uniqueidentifier column that has the Rowguidcol property is sorted after the columns of data type decimal, numeric, money, and varchar.
Note You may have to drop and then re-add columns to change the sort order. Additionally, the issue may reoccur if you add columns later.
Artikelnummer: 2585632 – Letzte Überarbeitung: 22.05.2012 – Revision: 1