I need to send some long emails, problem is when I send a long body text CDO breaks up the message with spaces in the middle of words. I read on this forum the solution would be to insert CR/LF into the message so that CDO would not have to break it up at every 1k of text. I have tried using CHAR(13) as BOL suggests, but this is not doing as intended, it inserts a space and not the CR/LF I need.
Any suggestions how to insert CR/LF or why my installation is not responding to CHAR(13) is there some other escape code I could use?Char(10) ?|||An ASCII cr/lf is hexidecimal 0D0A. You could declare a char(2) variable and set it to 0x0D0A, then concatinate it to the string at your desired break points.
<code>
declare @.crlf char(2)
select @.crlf = 0x0D0A
</code>
HTH
Tom|||Hmmm, seems to work, my bad - I guess the results in QA are not accurate, but in the email the CR/LF exists.
Showing posts with label emails. Show all posts
Showing posts with label emails. Show all posts
Friday, March 23, 2012
How do I insert a word doc into a varbinary(max) field for full-text indexing
Need to start learning to use full-text and need to know how to insert word docs, emails, into the database. How is metadata retirieved from these sources and are they loaded into separate tables fields?
Thanks
Looks like I got my answer:
USE AdventureWorks GO CREATE TABLE myTable(FileName nvarchar(60), FileType nvarchar(60), Document varbinary(max)) GO INSERT INTO myTable(FileName, FileType, Document) SELECT 'Text1.txt' AS FileName, '.txt' AS FileType, * FROM OPENROWSET(BULK N'C:\Text1.txt', SINGLE_BLOB) AS Document GOThanks
Subscribe to:
Posts (Atom)