saving pdf files in database

Posted by monae on 25-Mar-2013 03:25

HI , can i get help in how ( using 4gl code )  to save pdf file in openedge database and then how to retrieve it and display it on screen .

All Replies

Posted by Jens Dahlin on 25-Mar-2013 04:35

To store the actual PDF in the database you could use a field of BLOB type (Binary Large OBject) or possibly CLOB (Character Large OBject). Depending on type you would either have to read the contents of the file into a variable of MEMPTR or LONGCHAR type and then store it in the database.


To view it you could for instance temporarily store the PDF on disk again and then open it using Arobe Reader.

The Progress Knowledgebase (knowledgebase.progress.com) has a good example in Solution no 20873. I cannot seem to link directly to it though.

This thread is closed