Using OLE to access BLOB type data in PB

Source: Internet
Author: User
Tags ole

In the process of database development, often need to store some memo information in the database, and the content of these notes is generally large, various formats-such as voice files, video files, picture files, text files, and so on, how to implement these formats in PB different notes file access and preview, PB developers are always concerned about a problem, this article systematically introduced three kinds of access to memo binary information methods.

There are three ways to store the notes binary information:

Method One: The file is saved in a fixed path and the file path and name is accessed in the database

Method Two: Database with BLOB type or varbinary type Word Gencun Reserve Note file

Method Three: Save the reserve note file locally with OLE storage structure

1, the basic concept of OLE

OLE is an acronym for Object linking embedding, embedded, which enables Windows applications to share data and programs.

2, OLE control

In Pb, an OLE control is an inclusion of an OLE object, you can edit the object by using the features and commands provided by the server application, or you can use automated OLE interaction to activate the object in the program and send commands to the server application; The OLE control in the window artboard allows users to embed and chain-knot components from multiple applications

2.1 Creating and setting OLE controls

Select the OLE control from the window artboard to insert the window.

When an OLE control is established and an object is inserted, PB activates the server application to allow editing and modification of the object; After you make an object in OLE an inactive state, you can use the Control Properties tab to set the properties of the control.

2.2 Activating the OLE object in the window artboard

Select Open in the pop-up menu of the OLE control to activate the OLE object in the artboard

To modify an OLE object using a server application

End modification: Restores an object to an inactive state by simply clicking any area other than the server Application object, or by directly closing the Server application window.

2.3 Embedding and chaining OLE controls

OLE objects can be embedded or chained to their applications. The embedded object's data is placed in the application, during the development process, the data is placed in the application's PBL library, and when the application is generated, the data is stored in an EXE or PBD file, although it can be modified while the program is running, but the modified data is not saved; The data for the linked object is stored outside the PB application. When an object is linked, the data file is not stored in the PB application, but the pointer to the reference data is used, and the data is managed and saved by the server application. This allows the server application to modify the processing data, and the processed data can be saved back to the original file. The link mode applies to data files that require multiple applications to share, and any application that modifies the data file affects all the applications that link the file.

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.