Robbe
Sat Apr 01 18:04:30 CST 2006
You have been better off writing your own class that mirrors
mail item. At least if Outlook changes, it won't blow up
your app.
--
Robbe Morris - 2004-2006 Microsoft MVP C#
Earn money answering .NET questions
http://www.eggheadcafe.com/forums/merit.asp
"basulasz" <basulasz@discussions.microsoft.com> wrote in message
news:9AC91ADA-9F81-4B08-9A37-D28E345250F7@microsoft.com...
> :)
> I got the solution. Outlook 2003 mail item is not serializable. I have
> created a new mail item class implementing ISerializable and
> Outlook.MailItem. And serialized it, so i am able to serialize it and
> insert
> into db.
>
> Thanks for comments and brain storming....
>
> "Robbe Morris [C# MVP]" wrote:
>
>> I wouldn't bet on that...
>>
>> --
>> Robbe Morris - 2004-2006 Microsoft MVP C#
>> Earn money answering .NET questions
>>
http://www.eggheadcafe.com/forums/merit.asp
>>
>>
>>
>>
>>
>> "basulasz" <basulasz@discussions.microsoft.com> wrote in message
>> news:85D6C162-8E92-4492-8F98-F8D83DA3C5C8@microsoft.com...
>> > This is a standart outlook mail item, so a structural change is a small
>> > possibility
>> >
>> > "Robbe Morris [C# MVP]" wrote:
>> >
>> >> What happens if you change the structure of your class
>> >> 6 months from now?
>> >>
>> >> When you go to deserialize your stored class into
>> >> the format of the new class, you are going to have issues.
>> >>
>> >> You still need to do it the old fashioned way...
>> >>
>> >> --
>> >> Robbe Morris - 2004-2006 Microsoft MVP C#
>> >> Earn money answering .NET questions
>> >>
http://www.eggheadcafe.com/forums/merit.asp
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> "basulasz" <basulasz@discussions.microsoft.com> wrote in message
>> >> news:586BF3F7-35B6-4079-B7B3-7F638DB7E74D@microsoft.com...
>> >> >I get an e-mail in C# I want to store this e-mail item in SQL Server
>> >> >2005.
>> >> >I
>> >> > don't have any hardcopy of this mail item. I only have a
>> >> > programmatic
>> >> > C#
>> >> > object, and i wish to insert it into a varbinary field. How can i
>> >> > convert
>> >> > this object to a suitable form to insert to db?
>> >>
>> >>
>> >>
>>
>>
>>