开发者

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 h开发者_运维百科ave 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜