Solved

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

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
query execution hang 5 32
Linked Server Issue with SQL2012 3 26
what are the unique tables in SQL master database 5 62
Find results from sql within a time span 11 32
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

803 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