Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8098237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:01:12+00:00 2026-06-05T22:01:12+00:00

Ok I’m using SQL Server 2008 and have a table field of type VARCHAR(MAX)

  • 0

Ok I’m using SQL Server 2008 and have a table field of type VARCHAR(MAX). Problem is that when saving information using Hibernate, the contents of VARCHAR(MAX) field is getting truncated. I don’t see any error messages on either the app server or database server.

The content of this field is just a plain text file. The size of this text file is 383KB.

This is what I have done so far to troubleshoot this problem:

  1. Changed the database field from VARCHAR(MAX) to TEXT and same
    problem occurs.

  2. Used the SQL Server Profiler and I noticed that the full text
    content is being
    received by the database server, but for some reason the profiler freezes when trying
    to view the SQL with the truncation problem. Like I said, just before it freezes, I
    did noticed that the full text file content (383KB) are being received, so it seems
    that it might be the database problem.

Has anyone encountered this problem before? Any ideas what causes this truncation?

NOTE: just want to mention that I’m just going into SQL Studio and just copying the TEXT field content and pasting it to Textpad. That’s how I noticed it’s getting truncated.

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T22:01:13+00:00Added an answer on June 5, 2026 at 10:01 pm

    Your problem is that you think Management Studio is going to present you with all of the data. It doesn’t. Go to Tools > Options > Query Results > SQL Server. If you are using Results to Grid, change "Maximum Characters Retrieved" for "Non XML data" (just note that Results to Grid will eliminate any CR/LF). If you are using Results to Text, change "Maximum number of characters displayed in each column."

    enter image description here

    You may be tempted to enter more, but the maximum you can return within Management Studio is:

    65535 for Results to Grid
    8192  for Results to Text
    

    If you really want to see all the data in Management Studio, you can try converting it to XML, but this has issues also. First set Results To Grid > XML data to 5 MB or unlimited, then do:

    SELECT CONVERT(XML, column) FROM dbo.table WHERE...
    

    Now this will produce a grid result where the link is actually clickable. This will open a new editor window (it won’t be a query window, so won’t have execute buttons, IntelliSense, etc.) with your data converted to XML. This means it will replace > with > etc. Here’s a quick example:

    SELECT CONVERT(XML, 'bob > sally');
    

    Result:

    enter image description here

    When you click on the grid, you get this new window:

    enter image description here

    (It does kind of have IntelliSense, validating XML format, which is why you see the squigglies.)

    BACK AT THE RANCH

    If you just want to sanity check and don’t really want to copy all 383K elsewhere, then don’t! Just check using:

    SELECT DATALENGTH(column) FROM dbo.table WHERE...
    

    This should show you that your data was captured by the database, and the problem is the tool and your method of verification.

    (I’ve since written a tip about this here.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have thousands of HTML files to process using Groovy/Java and I need to
I have a view passing on information from a database: def serve_article(request, id): served_article
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.