Solved

Storing large amounts of Text truncates even though SQL Data Type set to varchar(Max)

Posted on 2007-11-30
5
779 Views
Last Modified: 2012-08-13
I am storing a fairly large amount of text (HTML) in a field in SQL server 2005 Express that is datatype varchar(Max). There is no way the text would exceed the 2GB size limit for this data type though. For reference, we have 9 years worth of similar articles (2-3 per day) in this DB and the total DB size is about 4GB. The data is being written via a Coldfusion based web interface.

Any ideas??? TIA!
0
Comment
Question by:Spitfire6
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 9

Expert Comment

by:nito8300
ID: 20385174
Have you tried using field type text?
0
 

Author Comment

by:Spitfire6
ID: 20385210
It is my understanding that in SQL Server 2005 (and Express) that varchar, nvarchar etc. are intended to replace the 'text' data-types and the the text data types will be deprecated in future versions.

But to answer your question, no I have not tried the 'text' data-type.
0
 
LVL 39

Accepted Solution

by:
gdemaria earned 125 total points
ID: 20385622
Go into coldfusion's CFIDE/administrator and click on your datasource
Click the advanced options button
and look at the field called Long Text Buffer.   You can increase that field as it limits the number of characters fetched from the database.
0
 

Author Comment

by:Spitfire6
ID: 20385872
Hi gdemaria,

Thanks! That got it! Actually the buffer size was defaulted to 64,000 which is OK but there is a check box just above entitled "Enable Long Text Retrieval (CLOB)" that needed to be checked.

Your answer saved me much time. Since posting the question I have been reviewing how SQL 2005 handles row / page sizes in excess of 8K... essentially barking up the wrong tree!

Points to you!
0
 
LVL 39

Expert Comment

by:gdemaria
ID: 20385995
As you may surmise,  I happen to know this because there was a time I had the same problem and it was a killer - so I'm glad I could help save you the hair-loss :)
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

632 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question