Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

String data, right truncation ERROR

Status
Not open for further replies.

mbosco

IS-IT--Management
Feb 13, 2002
5
US
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



 
ignore this line
This is if you want to store small text on the same row page.

EXEC sp_tableoption 'PAGE', 'text in row', 'on'
 
I can make this work in Query Analyzer by changing the @vPge_Text to 'text blob here'

But when I pass the blob into the variable from a stored procedure I get an error
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top