Oracle OCI-based data access C language Interface ORADBI (top)

Source: Internet
Author: User
Tags oracle database

ORADBI was developed on the basis of Oracle OCI (Oracle Invoke interface), supporting databases such as Oracle8i, 9i, 10g, and so on. According to Oracle's introduction: OCI is so reliable that every SQL statement in an Oracle database is executed through OCI. When application developers need the most powerful interfaces for Oracle database servers, they invoke the Oracle Invocation interface (OCI). OCI provides the most comprehensive access to all Oracle database functionality. The OCI API contains the latest performance, scalability, and security features.

The biggest benefit of adopting OCI is that it is the closest technology to Oracle, and therefore the highest efficiency. At the same time, it is cross-platform. Therefore, in the ORADBI library that I give, there is no external dependency other than OCI, which can be ported to a non-Windows platform or other embedded platform with a slight change.

However, OCI is also less easy to use. Its function is strong, the granularity is fine, the grammar is cumbersome, is not suitable for today familiar with the rapid development mode of personnel use. However, OCI's efficient, directly rooted in the database core, Cross-platform language features, other such as oo4o, OLE DB, ADO and other COM methods do not have. I originally developed the ORALCE database 4 years ago, using oo4o. Until recently, the use of OCI became my hobby. So, write a set of OCI helper storehouse, convenient OCI use. I dare not say it is OCI Wrapper library, because I am not able to package all aspects of OCI. However, my oradbi is enough for me (probably including you) to use everyday. I use this set of ORADBI to manipulate large data fields such as blobs.

There is no commercial risk of publishing this set of ORADBI: I own all the copyrights of this library, and any individual or group can use the ORADBI library for any purpose free of charge, provided it is not possible to declare the copyright of the ORADBI Library. I am not responsible for any consequences arising from the use of the ORADBI library. If this software has been of great help to your work, I won't reject any of your funding.

Well, let's take a look at this library, which contains the following files:

.h文件                 .c文件
oradbi.h*             oradbi.c
oracol.h              oracol.c
oraconn.h           oraconn.c
oradate.h            oradate.c
oraerr.h               oraerr.c
oraparam.h         oraparam.c

orarows.h            orarows.c
orastmt.h             orastmt.c
oratype.h

unistd.h
list.h                    list.c
hashmap.h        hashmap.c

Among them, oradbi.h is the only header file you need to include. When connecting ORADBI as a dynamic library to your project, you add code similar to the following in your project:

// test.cpp
#include "../oradbi/oradbi.h"

#ifdef _DEBUG
  #pragma comment(lib, "../oradbi/debug/oradbid.lib")
#else
  #pragma comment(lib, "../oradbi/release/oradbi.lib")
#endif

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.