Solved

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

Posted on 2003-11-04
4
320 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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

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…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

705 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