SyncChanges icon indicating copy to clipboard operation
SyncChanges copied to clipboard

varbinary

Open aharalambopoulos opened this issue 3 years ago • 4 comments

If the table has a varbinary field type the insert/update failed with the error message Implicit conversion from data type nvarchar to varbinary is not allowed. Use the CONVERT function to run this query.

aharalambopoulos avatar Dec 01 '22 15:12 aharalambopoulos

I can't repro. Can you provide the log output with the log level set to Debug?

mganss avatar Dec 05 '22 17:12 mganss

Just create a table

CREATE TABLE dbo.foo
(
    NUM_TRF int,
    NAME varchar(255),
    DESCRIPTION varchar(1000),
    REPORT varbinary(max)
)

on both sites ( source and destination) and try to synchronize this. The insert/update should be done using the CAST('some_data_in_report_filed' AS VARBINARY(MAX))

aharalambopoulos avatar Feb 07 '23 08:02 aharalambopoulos

Works for me. Had to make NUM_TRF a primary key though, otherwise change tracking can't be enabled on the table. Do you have change tracking enabled on the table?

mganss avatar Feb 21 '23 18:02 mganss