Image Upload and Display?

Doug Johnson

New Member
[Windows XP - Progress V91E]

We would like for a user to be able to upload images in Progress and then in the future, display those images in Progress. Preferably, the images would be "linked" to a network location and not actually stored in the Progress db. But either way would be ok. Any help would be greatly appreciated.
 

rzr

Member
btw...this is on 10.2A

Code:
[FONT=courier new]DEFINE VARIABLE v_imgFile  AS CHARACTER   NO-UNDO.[/FONT]
[FONT=courier new]
DEFINE IMAGE  v_Image
     FILENAME v_imgFile
      SIZE 60 BY 8. [/FONT]
[FONT=courier new]
DEFINE FRAME MyFrame
    v_Image AT ROW 2 COL 10
    WITH 1 DOWN NO-BOX KEEP-TAB-ORDER OVERLAY 
         SIDE-LABELS NO-UNDERLINE THREE-D 
         AT COL 1 ROW 1.[/FONT]
[FONT=courier new]
SYSTEM-DIALOG GET-FILE v_imgFile        
        TITLE      "Chose an Image to load ..."        
        FILTERS    "JPEG Files "   "*.JPG",
                   "TIFF Files "   "*.tiff",        
                   "ICON Files "   "*.ico"
        MUST-EXIST        
        USE-FILENAME .[/FONT]
[FONT=courier new]
MESSAGE v_imgFile
    VIEW-AS ALERT-BOX INFO BUTTONS OK.[/FONT]
[FONT=courier new]
v_Image:LOAD-IMAGE(v_imgFile) IN FRAME MyFrame .
VIEW v_Image IN FRAME MyFrame.
[/FONT]
 

RealHeavyDude

Well-Known Member
To me it is not clear as to what you mean by uploading:

The ability to handle large objects (BLOB and CLOB data types for database fields and BLOB and LONGCHAR variables) is not available in 9.1e. The only data type that could be used is RAW but this data type provides only limited size (AFAIK somewhere around 32.000 bytes as this is the size limit of a database record). Therefore, whatever it is you want to achieve might only be possible putting a lot of effort into it and relying on third-party technology (splitting the images into junks not larger then the limit of the RAW data type). I can only urge you to upgrade. Even more so, as OpenEdge 11 has just been released and you are talking about more than 10 years old software which, conceptually, dates back to the end of the 1990s, and, which will be retired by Progress any time now.

As of OpenEdge 10 there are data types available to store large objects on variables, Temp-Tables and database tables which effectively allows you to transport (upload) them passing them as parameters between ABL procedures running on the client and on the AppServer. Additionally you can persistently store them in the database or in some other location and just store the link to them in the database. There are pros and cons for either approach.

If your application is client/server then there is no upload within the ABL other than the one into the database. For any "upload" whose destination is not the database you need to do OS copies or moves - which you actually can from within the ABL using the respective commands (OS-COPY, OS-COMMAND, ...).

Heavy Regards, RealHeavyDude.
 
Top