F98MODAT Dowload File - JDE 9.2

leonardocollovini

Member
Hi,
I trying create business function to dowload file (PDF) from F98MODAT, I can download file in the directory but I think decoding is not correct. Somebody knows?

jdeBufferUncompress((BYTE **)&pData, &nDataSize, (const BYTE *)dsF98MODAT.zutxft.lpValue, dsF98MODAT.zutxft.lSize);
jdeStrncpy(szFileName, (const JCHAR *)lpDS->szPathTo, DIM(szFileName) - 1);
stream = jdeFopen(szFileName, _J("w"));
jdeFwriteConvert(lpBhvrCom, (JCHAR *)dsF98MODAT.zutxft.lpValue, sizeof(JCHAR), dsF98MODAT.zutxft.lSize, stream);
jdeFclose(stream);
 
Solution Found.

[FONT=&quot]E1: MOBJ: New Media Object APIs to Work with Attachments Stored in F98MODAT Table from Tools Release 9.2.1.6 ([/FONT]Doc ID 2301138.1[FONT=&quot])[/FONT]
 
Hi,
I trying create business function to dowload file (PDF) from F98MODAT, I can download file in the directory but I think decoding is not correct. Somebody knows?

jdeBufferUncompress((BYTE **)&pData, &nDataSize, (const BYTE *)dsF98MODAT.zutxft.lpValue, dsF98MODAT.zutxft.lSize);
jdeStrncpy(szFileName, (const JCHAR *)lpDS->szPathTo, DIM(szFileName) - 1);
stream = jdeFopen(szFileName, _J("w"));
jdeFwriteConvert(lpBhvrCom, (JCHAR *)dsF98MODAT.zutxft.lpValue, sizeof(JCHAR), dsF98MODAT.zutxft.lSize, stream);
jdeFclose(stream);

since pdf is already a compressed format i bet it's not compressed at all. Try just writing the BLOB field to a file in binary mode
 
Are you trying to extract media object content? There are a plethora of C API calls to work with media objects, you shouldn't have to read the table directly.
 
Back
Top