Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 CDO.Message object only takes first 256 char of passed message body

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-07-16 : 09:27:22
CJ writes "I can send e-mail from stored procedure using the sp_send_cdosysmail and sp_send_cdontsmail, but the message body is only taking 256 chars of the message in either sp. I have confirmed all of the message body is passed to sp_send_cdosysmail, confirmed all the message is in @body before and after the statement:

< EXEC @hr = sp_OASetProperty @iMsg, 'TextBody', @Body>

And I have confirmed 'TextBody' only holds 256 chars I passed to it in the above statement. Why will it only accept the first 256 char of my message body, regardless of which stored procedure is called?

I don't know where to look next for the cause or a solution.

This is running on Win 2000 Server 2000, SQL7 sp2 (I know the service pack should be updated, but it errors out on script 3, another problem to solve)"

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-07-16 : 10:28:51
AFAIK the sp_OA procedures only accept 256 characters maximum. I believe that SQL 2000 can accept up to 8000, but 7.0 is limited to 256.

Go to Top of Page

CJ
Starting Member

1 Post

Posted - 2002-07-16 : 12:55:02
I found the solution to my problem.

By setting the receiving variable for the message body to TEXT instead of varchar( in the Procedure creating the CDO Object), I side step the 256 limit. I found the answer after posting the question. Sorry for calling for help before checking all the availible information on the subject.

Go to Top of Page
   

- Advertisement -