• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 523
  • Last Modified:

ntext only returns 255 characters

I have a table with both varchar and ntext fields types.  I recently converted a varchar(300) field to ntext.  I can store 1000+ chars in this field and see all of them when browsing using something like an Access ADP file but a select statement or crystal report will only return the first 255 chars.  Other ntext fields in the same table return more than 255 chars.  Why can't I retrieve all of the ntext field in Query Analyzer or Crystal?
0
mdebeer
Asked:
mdebeer
  • 6
  • 4
  • 2
1 Solution
 
mdebeerAuthor Commented:
P.S. "select @@textsize" shows a value of 64512
0
 
mdebeerAuthor Commented:
It gets stranger... a select on two ntext fields in Query Analyzer only show 255 chars.   But for the same two fields in Crystal Reports, the first (originally varchar(300) and converted to ntext) shows 255, the second (orginally defined as ntext) shows the whole field.
0
 
arbertCommented:
In query analyzer, if you go to Tools, Options, Results tab, what is the setting for the "maximum characters per column".

Ho did you conver the varchar columns to Ntext?  Enterprise Manager?
0
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

 
mdebeerAuthor Commented:
Ah ha!  Progress.  In Query Analyzer it was set to 256.  I changed it to 3000 and got all the characters.  But do you know why it doesn't show them all in Crystal Reports?  It does show more than 255 for other ntext fields in the same table.  And yes, I changed it in Enterprise Manager.
0
 
arbertCommented:
What version of Crystal?  The earlier versions didn't have the greatest support for Text types....
0
 
mdebeerAuthor Commented:
version 9 or 9.2.3.970 to be exact.  Thing I don't get is why it displays some ntext fields entirely but not this one.  I have the "Can Grow" attribute set as well.
0
 
arbertCommented:
Hmm, did you "refresh" the structure after you converted the column from Varchar to Ntext?
0
 
mlmccCommented:
AFter you changed the database did you do a VERIFY DATABASE in Crystal

Open the report
Click DATABASE --> VERIFY DATABASE
you may get a window to remap the fields.  If the appropriate fields don't show then ensure all fields are displayed. There is a check box for show all fields or shows matching fields. I on't have CR here to verify which t is.  It needs to be reversed.

mlmcc
0
 
mdebeerAuthor Commented:
Yes, I tried that too and it did not prompt me to remap fields, just said the database was up to date.
0
 
arbertCommented:
Ok, so if you build a new report, does it work correctly?  I've had problems in the past where Crystal is just difficult to force a structure refresh.  Sometimes just by using "Set Location" it will force it as well.
0
 
mlmccCommented:
You may have to delete the field from the report then readd it.  If that doesn't work try deleting the field, verify the database, then readd the field.

mlmcc
0
 
mdebeerAuthor Commented:
I tried changing the location to a view of the same name in a different database and that and it didn't work; also tried to delete field and readd it.  I finally solved it but I had to remove the field from my view, then verify the database, then re-add it to the view, then reverify the database and that did the trick.  Thanks for your suggestions.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

  • 6
  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now