简体   繁体   中英

Connecting to oracle database using C++, the basics

i have a question about the theory here, i'm just starting a project which is based on C++ applications integrating with oracle DB's, i've came to two choices, OCCI, and OCI

the OCCI is said to be aimed at C++ environment, but i was wondering, if it would be any good to use the OCI libraries from my C++ app since it is said to have better performance, or would i run into compatibility issues ?

thanks in advance :)

You can have a look at OTL it's a wrapper above the OCI or OCCI (not sure) will give some templates and samples to start with oracle connection in c++.

In my case, my company have about a thousand stores.

To connect Oracle / Oracle thru an MS C++ multi-thread service we perform the following tests on each thread:

  • Validate DNS (gethostbyname)
  • Try to open SCManager of the store (OpenSCManager)
  • Verify if Oracle Service exists on the store (OpenService)
  • Verify if Oracle Service is running (QueryServiceStatus)

After all, we try to connect (ado->Open)

This procedures minimize possible errors like 0xE06D7363 when connecting to a external server.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM