E9.2 upload PDF in media object table with BSFN

chrix75

chrix75

Member
Hi there,
I'm trying to use the API jdeGTAddUpdate_OLE to upload a PDF into the media object via a UBE.
The BSFN I wrote keeps on return error
This is the bits I wrote based on similar code I found.

{ /* Populate the pMOData for the new record */
lTotalRec = 1;
pMOData = jdeAlloc(COMMON_POOL, 255 * sizeof(LPMODATA), MEM_ZEROINIT);
pMOData->nSeq = iSequenceNum;
pMOData->nMOType = 1;
jdeStrcpy(pMOData->szUser, _J("VENDOR"));
jdeStrcpy(pMOData->szItemName, lpDS->szGenericTextItemName_GTITNM);
jdeStrcpy(pMOData->szQueueName, _J(" "));
jdeStrcpy(pMOData->szFileName, lpDS->szGTFileName_GTFILENM);
pMOData->pData = jdeAlloc(COMMON_POOL, 30001, MEM_ZEROINIT);
jdeStrcpy(pMOData->pData, lpDS->szMediaObjectText_MOTEXT);
//jdeStrcpy(pMOData->pData, lpDS->szGTFileName_GTFILENM);
JDBReturn = jdeGTAddUpdate_OLE(lpDS->szObjectName_OBNM, lpDS->szKey_MOTXKY, pMOData, lTotalRec);

I'm not sure what is missing or what I pass wrong as I cannot find useful documentation.
Anyone can help please?

thanks
Christian
 
What's your Use Case?
Is this for a batch job (such as attaching files from a network folder) or in a interactive application?
If batch there are easier ways to handle things.
And do you really want to use OLE? You know that's only supported on the IE Browser, right?
 
Back
Top