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
 Import/Export (DTS) and Replication (2000)
 size limitation when importing mail message into table?

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-03-12 : 23:01:22
isabelle writes "This is probably a really simple question (what I mean of course, is that the answer is probably really simple), but I can't find the information anywhere!

Within an ActiveX script task, I read in the content of a mail message into a variable for further processing. However, I don't seem to be able to get the whole message in the variable (the message is about 180kb)- is this because I'm doing something wrong, or because there's a size limit to what can be put into a string variable?

Here's the (simplified) code I'm using, in case it's something wrong with the code:

set con = CreateObject("ADODB.Connection")
set rsMail = CreateObject("ADODB.RecordSet")
con.Open strCon

rsMail.Open "master.dbo.xp_readmail", con
while not rsMail.EOF
if rsMail("Subject") = (something)
strData = strData & rsMail("Message").value
end if
rsMail.MoveNext
wend

When I compare strData to the original message, strData is obviously shorter: if I export it to a text file, the file is about 64kb, and data is missing.

If it is a size limitation problem, are there any ways around it? Basically, what I want to do is take this mail message and put the content into a table. Can it be done or is the size of the message an issue?

SQL Server version is 7.0.

Thanks in advance for any help. "

rrb
SQLTeam Poet Laureate

1479 Posts

Posted - 2002-03-12 : 23:57:41
Isabelle

I believe that there is a 64kb limit on strings - but I must admit I've never got anywhere close to finding out.

The code you've given looks like you're concatenating all your mail messages into one string.
Is that really what you want to do?


--
I hope that when I die someone will say of me "That guy sure owed me a lot of money"
Go to Top of Page
   

- Advertisement -