I'm trying to update the contents of a Text
datatype with a new version of o file with no success.
The table in SQL Server 2012 has a column of the text
datatype and already has the contents of a text file in it.
I want to update those contents. I know I can update it manually using
UPDATE [MANUTXML].[dbo].[MANUTXML]
SET [SOURCEXML] = REPLACE(CAST([SOURCEXML] AS VARCHAR(max))
But I need to make a lot of changes to the original file so it's a lot easier to replace the entire file.
I've already tried to do it in Management Studio 2012 and today I've tried using C# do do the same. The result is the same
String or binary data would be truncated. The statement has been terminated.
Any help please. Either C# or T-SQL. I just need to insert a file from a string read or copied from the filesystem?