PB If the PDF file is converted into binary data saved to the database and read the display.
Adds a PDF OLE control to the window.
OLE Control Association file
String Ls_filepath,ls_filename
Blob Lb_object,ole_blob
Getfileopenname ("Select File to open", Ls_filepath, Ls_filename)
If filename = "" Then return
If ole_pdf.insertfile (filepath) = 0 Then
Savefilename = filename
Savefilepath = FilePath
End If
Convert PDF file to binary data
Lb_object = Preview.objectdata
Updateblob save binary data to database
SELECTBLOB read binary data from a database
eg.
Updateblob Dpr_doc Set ole_object =: Lb_object
WHERE (Dpr_doc.docregn =: globalregion)
Selectblob Ole_object Into:ole_blob from Dpr_doc
WHERE (Dpr_doc.docregn =: globalregion)
If a database-saved path can associate a path
Ole_pdf. Linkto (Ls_filepath)
Reading BLOB data from a database, passing BLOB data from the file to the OLE control
Assigning the BLOB data to the actual data control
Ole_pdf.objectdata = Ole_blob
Preview Display the PDF file
Ole_pdf. Activate (offsite!)