Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Putting Object into BLOB field
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
01423962
Message ID:
01425333
Vues:
55
>Well here is the code I ended-up with:
>
>
>FOR EACH loAttachment in toMsg.Attachments
> lcFileName = loAttachment.fields.item(cdoAttachmentFilename).value
> lcMediaType = loAttachment.fields.item(cdoContentMediaType).value
> loStream = loAttachment.GetDecodedContentStream()
> lwStream = loStream.Read()
> INSERT INTO (lcTodayAttach) ;
> (iTimeId, cFileName, cMediaType, wAttachmnt) VALUES (lnTimeId, lcFileName, lcMediaType, lwStream)
>ENDFOR
>
>
>Only problem is occationally 'lwStream = loStream.Read()' causes error:
> OLE IDispatch exception code 0 from ADODB.Stream: Operation is not allowed in this context...
>
>Just a thought but is there any way persisting and writing the whole object loStream to a field or file so that I can examine it's properties outside of the COM object?

Nick,

It's a long time ago - but try
#define adSaveCreateOverWrite	2
=loStream.SaveToFile('\tmp\00.eml', adSaveCreateOverWrite)
look here for more info http://msdn.microsoft.com/en-us/library/ms675032(VS.85).aspx
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform