How to save multiple files in the blob field of oracle

Source: Internet
Author: User

OracleOfBLOB FieldType can be used to save binary data with a long length. However, the Code for reading and writing BLOB field data is usually very wordy, and it is easy to make mistakes without careful coding. I integrate this feature into my OCI packaging library ORADBI. The following example shows how to use ORADBI to save multiple files to a field.

In another example, I will demonstrate how to restore the data in the BLOB field to a file.

The entire ORADBI is a C language api I wrote based on OCI. It has been more than a year since the API was created and continuously updated and maintained. I will continue to maintain and improve and add new functions. ORADBI is completely free and open-source. Users can use it to do anything without declaring it as copyright.

This is an example of operating BLOB directly using OCI. I believe that this is the quickest way you can find.

1) First, ensure that you can use Oracle9i or 10g clients on your machine. You only need to install the Windows real-time client for Oracle10g.

2) download my ORADBI library. I provide complete library code and example programs.

Http://download.csdn.net/source/589896

3) define the path of the file to be saved, for example:

Const char * arrLobFiles [] = {

"E: \ eBookLib-computer \ C & C ++ \ APress. Cryptography in C and c00000000_sourcecode.rar ",

"E: \ eBookLib-computer \ C & C ++ \ Charles. River. Media. Algorithms. For. Compiler. Design. eBook-LiB.chm ",

"E: \ eBookLib-Exception Handling Mechanism in computer \ C & C ++ \ cand CIDR blocks ",

"E: \ eBookLib-computer \ C & C ++ \ The art of assmebly language.pdf ",

"E: \ eBookLib-computer \ C & C ++ \ Jones. And. Bartlett. Publishers. Foundations. Of. Algorithms. Using. Cpp. pseudo docode.3rd. Edition. eBook-Li.chm ",

"E: \ eBookLib-computer \ C & C ++ \ The C ++ Standard Library.pdf ",

"E: \ eBookLib-computer \ C & C ++ \ GCC--CompleteReference.pdf ",

"E: \ eBookLib-computer \ C & C ++ \ VC technology insider Fifth Edition. chm ",

"E: \ eBookLib-computer \ Network & Tcpip \ ALTHOS. introduction. to. data. networks. PDN. LAN. MAN. WAN. and. wireless. data. technologies. and. systems. e. chm ",

"E: \ eBookLib-computer \ Network & Tcpip \ Digital Satellite Communications 2nd Ed-book.pdf ",

"E: \ eBookLib-computer \ Network & Tcpip \ McGraw. Hill. Storage. Networks. The. Complete. Reference. chm ",

"E: \ eBookLib-computer \ Network & Tcpip \ UNIX Network Programming Volume 1_3rd Edition-The Sockets Networking API. chm"

};

I believe that you now have some knowledge about how to save multiple files in the blob field of oracle, so that you can easily solve similar problems in future work.

Related Article

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.