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:
01423964
Vues:
49
>As part of an SMTP event sink I am trying to INSERT an object (attachment) into a BLOB field in a table. Unfortunately this does not work and cause a Data Type Mismatch.
>
>
>CREATE TABLE MyAttachments FREE (iTimeId I, cFileName C (50), cContType C(50), wAttachmnt W)
>
>PROCEDURE ISMTPOnArrival_OnArrival(toMsg AS VARIANT, tnEventStatus AS VARIANT @) AS VOID
>	lnTimeId = 123456
>	FOR EACH loAttachment in toMsg.Attachments
>		INSERT INTO Attachments 
>		(iTimeId, wAttachmnt) VALUES (lnTimeId, loAttachment.GetDecodedContentStream())
>	ENDFOR
>
>
>Any guesses where I might be going wrong?
>
>Thanks,
> Nick

Did you try to examine what does GetDecodedContentStream() return?

Say,

oStream = loAttachment.GetDecodedContentStream()

cText = oStream.ReadText()
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform