Solved

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

Posted on 2007-11-30
5
760 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
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
The viewer will learn how to dynamically set the form action using jQuery.
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…

820 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