PB if convert PDF to binary data save to database and read show __ database

Source: Internet
Author: User
Tags ole

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!)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.