I've been trying to import the body from emails into a field in a SQL 2005 database but it keeps losing the formatting (carriage returns, tabs, etc)
Anyway of getting around this?
I've been trying to import the body from emails into a field in a SQL 2005 database but it keeps losing the formatting (carriage returns, tabs, etc)
Anyway of getting around this?
What data type if your field in SQL? If you're using a "text" field (nvarchar or similar) then this is likely to be the cause.
If you really need the e-mail body intact then you'll probably need to store it as a blob (binary) field. This will have implications (you should read up about storing binary object in SQL) but it will allow you to store the body of the message.
Presumably you have some good reason why these messages need to be stored IN SQL and not outside (on the file system for example) with only pointers to the messages in SQL?
Hi Jody,
What did you changed exactly? I've exactly the same problem. What I'm doing...
Read messages from Exchane and put them into a temporary datatable and after reading all the messages from Exchange I save the datatable contents to my SQL database.
Currently the formatting of the body gets messed up and it is hard to read afterwards!?
Maybe you can help me....
Thanks!
Marcel