?
Solved

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

Posted on 2003-11-04
4
Medium Priority
?
321 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 1000 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

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Suggested Courses

777 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