Link to home
Start Free TrialLog in
Avatar of RosalindAbel
RosalindAbel

asked on

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

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
ASKER CERTIFIED SOLUTION
Avatar of Lowfatspread
Lowfatspread
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RosalindAbel
RosalindAbel

ASKER

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
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
;-)

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.