CODBC :: An Introduction
=====
`CODBC` is an _open source `C++` API for `Pro*C`_. If you try to connect `C++` with `Oracle SQL` then you have two options, `OCCI` or `Pro*C`. `Pro*C` is the oldest way through which you can connect your `C++` code with `Oracle SQL`. `OCCI` was introduced with `Oracle 9i`, but `Pro*C` has been there long before that. Well, there is not much support over internet for `Pro*c` as much as you can find for `OCCI` or any other tool or API for `C++` and Oracle Connection. `Pro*C` has a complete different approach towards making this bridge between `Oracle SQL` and `C++`.
`CODBC` provides you with inbuilt classes and functions similar to `OCCI`. Writing a program over `Pro*C` is not as simple as writing a normal program in `C++`. Though it is not that difficult, but it is not even a piece of cake. If you are newbie to coding and want your `C++` application to interact with `Oracle SQL`, you can use `CODBC`. But before you use `CODBC`, you have to install `Pro*C` and configure your `Oracle SQL` with `Pro*C`. If you are one of the programmers working on some legacy systems, then `CODBC` will serve you as a loyal friend and you will love to add `CODBC` classes to your code for better and easy implementation.
###Benefits of using `CODBC` over conventional `Pro*C`
Before this, I would explain you the mechanism of writing Pro*C code:
* Unlike `C++`, `Pro*C` codes are not written in `C++` files. Rather they are written in `.pc` files.
* After writing the complete code in `.pc` file, the file is compiled using _Oracle Precompiler_ to get respected `.cpp` files.
* The `.cpp` file which you get after compiling the `.pc` file will be completely changed, and you won't get much out of the file. It will be all `struct`s. Your 40 line code will change to 380 lines code.
* Now, you need to compile this `.cpp` file again to get the respective executable file.
In this process, you might get error when compiling `.pc` file, but _Oracle Pre-compiler_ do not check for `C++` code error. Moreover it just translates the `Pro*c` code to give a `.cpp` file.
Coming to the benefits of `CODBC`:
* Create a `.cpp` file, and start as you start with normal `C++` program.
* Include all the `header` files for `CODBC`, namely `SQLHelper.h` and `SQLHelperException.h`. Create an object of `SQLHelper` class and use the function calls from `SQLHelper` to process all the database related operations.
* Compile the `.cpp` file to get the executable. No need to write any `.pc` file.
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
C++操作Oracle SQL示例程序codbc-master.zip (14个子文件)
codbc-master
SQLHelper
SQLHelper.h 2KB
SQLHelper.cpp 48KB
SQLHelper.lis 0B
Examples
Code
SelectAll.cpp 2KB
ConnectDisconnect.cpp 2KB
MultipleConnection.cpp 4KB
ObjectOriented.cpp 2KB
InsertEveryColumnValues.cpp 2KB
SelectDBExample.cpp 2KB
LICENSE 1KB
SQLHelperException
SQLHelperException.h 578B
SQLHelperException.cpp 309KB
.gitignore 126B
README.md 2KB
共 14 条
- 1
资源评论
汪宁宇
- 粉丝: 872
- 资源: 43
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 渗透测试过程中使用的脚本,包括不限于针对特定程序设备的爆破脚本、利用代码,通用的脚本 .zip
- Web期末大作业,前端大作业,网页设计大作业-视频网站-Html+Css+js.zip,左边导航栏,右侧视频面板,有分页,有轮播图,搜索框,登录按钮等等
- 渗透测试辅助工具箱,反弹shell,命令生成器,输入对应IP端口即可,实现一劳永逸.zip
- java高校社团管理系统源码数据库 MySQL源码类型 WebForm
- 基于Python卷积神经网络人脸识别驾驶员疲劳检测与预警系统设计源码
- ANSYS Fluent 算例,气液两相流运动模拟
- ANSYS Fluent 算例,化学反应釜传热过程模拟
- 《python编程实战:运用设计模式、并发和程序库创建高质量程序》的范例代码
- qt5.12.8配套的Websocket
- 遗传算法模型框架(python源码)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功