Microsoft KB Archive/280684
Article ID: 280684
Article Last Modified on 10/16/2003
- Microsoft SQL Server 7.0 Standard Edition
- Microsoft SQL Server 2000 Standard Edition
This article was previously published under Q280684
When you assign a blank value to an image column table that is part of merge replication, the Merge agent may fail with the following error message:
This behavior only happens when the image column is updated to an empty string value such as "" on either the Publishing or Subscribing merge table.
You can check whether you have an empty string value in your image column by viewing the binary value stored in the image column. A binary value of "0x" indicates an empty string value.
This error message occurs because of an incorrect data conversion by the SQLGetData ODBC driver function. The SQLGetData function incorrectly interprets a blank value stored in the image column.
Avoid assigning empty string values ("") to the image columns.
To resolve this merge agent error, UPDATE the image column to a non-empty string value such as NULL or to an actual string value.
Steps to Reproduce Problem
Run the following CREATE TABLE statement:
Create Table Imagetest1 (c1 int ,c2 image,c3 char(4), c4 uniqueidentifier rowguidcol)
- Publish the table for Merge Replication.
Run the following INSERT statement, which updates the image column to a blank value.
Insert Imagetest1 values(1,'','merge_test',newid())
- Run the Merge agent. The Merge agent fails because of an invalid data type conversion for the image column.
To resolve this error, run the following UPDATE statement:
UPDATE Imagetest1 set image = 'non_blank_value' where c1 = 1
The Merge agent now runs successfully.
Additional query words: merge image enumerate changes
Keywords: kbprb KB280684