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:
01425332
Vues:
42
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?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform