Solved

SQL Server 2000 - unable to select more than 255 characters from a text field

Posted on 2003-11-04
4
319 Views
Last Modified: 2008-02-07
SQLServer 2000

I have a table which contains a column with data type of 'text'. I can insert a large amount of data into this column - currently up to 3000 characters - which can be verified by selecting the 'len' value. I cannot, however, select more than 255 characters from this column at one time.

After some research I have checked:

select @@textsize      which returns the result 64512

My question is about the DB-Library function 'dbsetopt'. It appears that one of the options that can be set using this function is DBTEXTLIMIT. Could this be governing the amount of text I can select - and if so how can I find out what it is set to currently and change it?

I can select chunks of 255 from the field as a work around.

Thanks

Rosalind Abel
0
Comment
Question by:RosalindAbel
[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
4 Comments
 
LVL 50

Accepted Solution

by:
Lowfatspread earned 250 total points
ID: 9678252
in what environment are you trying to process this data...

show the select statement you've been using...?


this isn't just a query analyser max col size to display problem is it?
see either
query / options
or
tools /results...
depending on version
 

0
 

Author Comment

by:RosalindAbel
ID: 9679257
Thank you - it is indeed a query analyser max col size  problem.

The environment is in SQL Server 2000, stored procedures. This large text field is going to be selected and placed in the @message parameter of the xp_sendmail procedure. Will the same problem occur?

Thanks for your help

Rosalind
0
 
LVL 50

Expert Comment

by:Lowfatspread
ID: 9690405
probably not
will the column data include formating commands.... (lf, tabs, cr, etc)


if you go much bigger you may want to investigate displaying the message
as an attachment to the email... obtained via the executed query option of the
sendmail stored proc...

hth
;-)

0
 

Author Comment

by:RosalindAbel
ID: 9831539
I have adjusted my stored procedure to stay within the 8000 character text limit imposed by the @message parameter of xp_sendmail and all is working fine.

Can I ask another xp_sendmail question -  Can I specify an alternative reply address using xp_sendmail?  I have text emails being sent out to multiple recipients and would like the receipients to be able to reply to a specific email address. This is to prevent one person having to attend to potentially hundreds of replies in one mailbox.
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

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…
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
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.

732 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