Michael Maddison
michael at ddisolutions.com.au
Thu Jan 18 18:47:29 CST 2007
Are you sure its not the viewer app that's truncating?
If your testing in QA you can set the column width in options to show
more then 8000 chars.
Your code looks ok to me.
cheers
Michael M
-----Original Message-----
From: dba-sqlserver-bounces at databaseadvisors.com
[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Robert
L. Stewart
Sent: Friday, 19 January 2007 5:59 AM
To: dba-sqlserver at databaseadvisors.com
Subject: [dba-SQLServer] Text column truncating
All,
I am trying to get a text data field to update in SQL 2000 using a
stored procedure.
CREATE PROCEDURE [dbo].[sp_SQL_addUpdate]
@SQLUpdate_By nvarchar(25),
@SQLUpdate_DB nvarchar(15),
@SQLUpdate_Object nvarchar(50),
@SQLUpdate_Description varchar(8000),
@SQLUpdate_Script text,
@SQLUpdate_ID int OUT
AS
DECLARE @ptrval binary(16)
INSERT INTO dbo.tblSQLUpdates(
SQLUpdate_By,
SQLUpdate_DB,
SQLUpdate_Object,
SQLUpdate_Description
)
VALUES (
@SQLUpdate_By,
@SQLUpdate_DB,
@SQLUpdate_Object,
@SQLUpdate_Description
)
SELECT @SQLUpdate_ID = @@Identity
SELECT @ptrval = TEXTPTR(SQLUpdate_Script)
FROM dbo.tblSQLUpdates
WHERE SQLUpdate_ID = @SQLUpdate_ID
WRITETEXT tblSQLUpdates.SQLUpdate_ID @ptrval @SQLUpdate_Script
When writing the text back, I am getting a truncated value.
My guess is that it is around 8000 characters. Anyone have any insight
into it?
Thanks,
Robert
_______________________________________________
dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
http://www.databaseadvisors.com