Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2007-11-30
5
Medium Priority
?
789 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 500 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

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…
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 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.

661 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