When you try to populate a Microsoft SQL Server 2000 table with a Data Generation plan in Microsoft Visual Studio 2005 Team Edition for Database Professionals, you may receive an error message that resembles the following:
Table TableName : System.Data.SqlClient.SqlError: Disallowed implicit conversion from data type ntext to data type varchar, table 'TableName', column 'ColumnName'. Use the CONVERT function to run this query.
This problem occurs when you try to populate the field for a varchar
field that contains more than 4000 characters.
This problem occurs because the SqlClient provider converts the varchar
data type to a text
data type. However, you cannot convert a text
data type to a varchar
data type in SQL Server 2000.Note
In Microsoft SQL Server 2005, the SqlClient provider uses a varchar(max)
data type instead of the text
data type. Therefore, this problem does not occur in SQL Server 2005.
To work around this problem, make sure that varchar
columns in a SQL Server 2000 database do not contain more than 4000 characters.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.