Expert Answer Center > Experts On Demand > View Answer
EMAIL THIS
Experts on Demand
  EXPERTS ON DEMAND HOME     POSE A QUESTION     VIEW ANSWERS     BROWSE BY TOPIC        RSS FEEDS  
My MS SQL Server 2000 database has two fields, one with varchar of 1000 characters and the other with nvarchar(1000), and 1000 characters are stored in the database. When I retrieve through select query and place it in a text area, I am not receiving the whole string of information, but rather a truncated value of only 256 characters. How can I get all the 1000 chars present in the database? QUESTION POSED ON: 07 FEB 2005
QUESTION ANSWERED BY: Craig Mullins, Years 2005-2006 Are you sure that there are actually 1000 characters in the column(s)? If not, use the LEN function to return the number of characters excluding trailing blanks. If the result is not 1000, then there are not 1000 characters stored in the column.

If there are 1000 characters, but you continue to get only 256 of them, consider the following:

  • If you are issuing the query from an application, try to run the query outside of the program (in Enterprise Manager) to see if the results are the same.

  • DB-Library applications and applications using the SQL Server ODBC drivers from SQL Server version 6.5 or earlier support only a maximum of 255 bytes of character data. If these applications attempt to retrieve character parameters of SQL Server version 7.0 or later, or result set columns containing more than 255 bytes of data, the character data is truncated at 255 bytes.
HomeExperts on DemandIT Expert Webcast SeriesExpert KnowledgebaseSite Index
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts