I keep getting this error when trying to update a large text field. I understand that you can not use the normal insert or update with larger blocks when using ntext, text, and image fields.
Script: Error #-2147217887 [Microsoft][ODBC SQL Server Driver]String data, right truncation
I found this on SQL Books online and modified it to my database and still get the same error.
I am not sure what I am doing wrong?
-------------------------------------------------------
CREATE PROCEDURE PAGE_UPDATExCONTENT @PageId numeric, @vPge_Text text AS
BEGIN
EXEC sp_dboption 'TRITON', 'select into/bulkcopy', 'true'
GO
EXEC sp_tableoption 'PAGE', 'text in row', 'on'
GO
DECLARE @ptrval binary(16)
SELECT @ptrval = TEXTPTR(PAGE_TEXT)
FROM PAGE
WHERE PAGE_ID=@PageId
WRITETEXT PAGE.PAGE_TEXT @ptrval @vPge_Text
GO
EXEC sp_dboption 'TRITON', 'select into/bulkcopy', 'false'
GO
END
Script: Error #-2147217887 [Microsoft][ODBC SQL Server Driver]String data, right truncation
I found this on SQL Books online and modified it to my database and still get the same error.
I am not sure what I am doing wrong?
-------------------------------------------------------
CREATE PROCEDURE PAGE_UPDATExCONTENT @PageId numeric, @vPge_Text text AS
BEGIN
EXEC sp_dboption 'TRITON', 'select into/bulkcopy', 'true'
GO
EXEC sp_tableoption 'PAGE', 'text in row', 'on'
GO
DECLARE @ptrval binary(16)
SELECT @ptrval = TEXTPTR(PAGE_TEXT)
FROM PAGE
WHERE PAGE_ID=@PageId
WRITETEXT PAGE.PAGE_TEXT @ptrval @vPge_Text
GO
EXEC sp_dboption 'TRITON', 'select into/bulkcopy', 'false'
GO
END