>>Say,
>>
>>oStream = loAttachment.GetDecodedContentStream()
>>
>>cText = oStream.ReadText()
>
>Unfortunately object does not support the ReadText() method returning error:
>OLE IDispatch exception code 0 from ADODB.Stream: Operation is not allowed in this context...
>
>All I know is that loAttachment.GetDecodedContentStream() returns an object (VARTYPE()=O), other than that I don't have much information on how to read these attachments, I don't even know if GetDecodedContentStream() is the correct method of retreiving the attachment but it is all I can find.
Which methods does it support? Can you find out using Intellisense?
Can you try
loStream = loAttachment.GetDecodedContentStream()
lwStream = loStream.Read()
INSERT INTO Attachments (iTimeId, wAttachmnt) VALUES (lnTimeId, lwStream)
If it's not broken, fix it until it is.
My Blog