Oracle oci/occi

本文介绍了Oracle Call Interface (OCI) 和 Oracle C++ Call Interface (OCCI) 的特性及使用方式。OCI提供了强大的接口来执行Oracle数据库中的SQL语句,而OCCI则为C++开发者提供了一个高性能且易于使用的面向对象接口。文章还展示了如何使用OCCI创建环境、连接数据库、执行SQL插入语句并终止连接。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

http://download-west.oracle.com/docs/cd/B12037_01/nav/portal_5.htm

 

*****************************************************

http://www.oracle.com/technology/tech/oci/index.html

 

Oracle Call Interface
Reliable - the Oracle Database executes SQL Statements with OCI.

 

When applications developers look for the most powerful and complete interface to the Oracle Database, they turn to Oracle Call Interface (OCI). Newest Oracle Database capabilities, performance, scalability, and security features appear first in the OCI API.

Languages, APIs, and applications that depend upon OCI:

  • Java applications using the OCI-based JDBC driver
  • PHP applications using the Oracle PHP adapter
  • Ruby/Rails applications using Oracle Ruby adapter
  • Python applications using Oracle Python adapter
  • Perl applications using Oracle Perl adapter
  • PL/SQL applications executing SQL
  • C++ applications using OCCI
  • C applications using the ODBC driver
  • VB applications using the OLEDB driver
  • .NET applications using the ODP.NET driver
  • Pro*C applications
  • Distributed SQL

*****************************************************

http://www.oracle.com/technology/tech/oci/occi/occibasic.html

 

Oracle C++ Call Interface (OCCI)

Are you interested in creating applications with the speed of OCI, but want seamless integration with C++?  The Oracle C++ Call Interface offers C++ developers a high performance connection to the Oracle database in a well-designed Object Oriented interface.

A Simple Useful OCCI Program


//create environment and connection

Environment* env = Environment::createEnvironment();

Connection* conn = env->createConnection( "scott", "tiger" );

cout << "Environment and Connection created" << endl;

 

//execute a SQL statement

Statement* stmt = conn->createStatement();

stmt->setSQL("INSERT into FRUITS (fruit, amt) VALUES ('apple', 10)");

stmt->executeUpdate();

conn->terminateStatement(stmt);

 

//terminate environment and connection

env->terminateConnection(conn);

Environment::terminateEnvironment(env);

cout << "Environment and Connection terminated" << endl;


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值