How to Get complete data from a Text type Column | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

How to Get complete data from a Text type Column

I’ve created a table in SQL server (2000) having a column with TEXT data type,
The problem I’m facing is I’m unable to get the complete text (more than 254 characters) from select statement Also I’m unable to get the complete data from my VFP 7.0 application if I use the SQLEXEC() function ( it is returning a memo type filed in SQLRESULT cursor with only first 254 characters. ) the complete sequence of statement is given below: –************************** Code Starts Here
— I have created the following table in SQL Server
CREATE TABLE msg ( msg_id char(10) NOT NULL,
msg_type numeric(1) NOT NULL,
msg_date datetime NOT NULL,
dept_id char(2) NOT NULL,
msg_desc text NOT NULL,
last_update datetime NOT NULL,
TS timestamp )
GO — Adding a new record into the Msg table
INSERT msg ( msg_id, msg_type, msg_date, dept_id, msg_desc, last_update )
VALUES ( ‘0600000016’, 1, ‘2006-05-11′, ’06’, ”, GETDATE() )
GO
— Now I am updating the table with large text value
UPDATE msg
SET msg_desc = ‘Message From : 06 06 THE PERFECTION HOUSE
Please send me the details of location in my region so that I can communicate with them for the better relationship. I have already completed the tasks assigned by you and waiting for new assignments. Also please send me the details of payment of our accounts so that we can reconcile the same in our books. Thanks Yours Faithfully, Raoshan’
WHERE msg_id = ‘0600000016’
GO — Now I’m trying to get the same from the following statement
SELECT msg_desc FROM msg WHERE msg_id = ‘0600000016’
GO — It is showing only first 254 characters of data and the other data is missing. –***************************** Code Ends Here
I again thought that the complete text will return if called from Application rather than query analyser, but from within the application also it has the same results. Please help me out Thanks Raoshan

See if this helps:
http://www.microsoft.com/resources/documentation/sql/2000/all/reskit/en-us/part3/c1161.mspx
http://support.microsoft.com/default.aspx?scid=kb;EN-US;194975

Frank Kalis
Microsoft SQL Server MVP
http://www.insidesql.de
Heute schon gebloggt?http://www.insidesql.de/blogs
Ich unterstuetze PASS Deutschland e.V. http://www.sqlpass.de)
]]>