Solved

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

Posted on 2007-11-30
5
737 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
  • 2
  • 2
5 Comments
 
LVL 9

Expert Comment

by:nito8300
Comment Utility
Have you tried using field type text?
0
 

Author Comment

by:Spitfire6
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Viewers will learn how the fundamental information of how to create a table.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

744 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now