ociconnection.h

来自「Oracle OCI 应用」· C头文件 代码 · 共 46 行

H
46
字号
// OCIConnection.h: interface for the OCIConnection class.
//
//////////////////////////////////////////////////////////////////////

#ifndef _OCI_CONNECTION_H_
#define _OCI_CONNECTION_H_

#include <oci.h>

#include "IConnection.h"

class OCIConnection : public db::IConnection  
{
	friend class OCIDBDriver;
private:
	OCIConnection();
protected:
	virtual ~OCIConnection();

public:
	//创建CallableStatement,用于调用存储过程
	virtual db::ICallableStatement *PrepareCall(const std::string &sql);
	//创建IStatement
	virtual db::IStatement *CreateStatement();
	//关闭连接
	virtual void Close();
	//设置提交模式
	virtual void SetAutoCommit(bool autoCommit);
	//取提交模式
	virtual bool GetAutoCommit();
	//提交在该连接上所做的所有操作
	virtual void Commit();
	//回滚在该连接上所做的所有操作
	virtual void Rollback();

private:
	OCIEnv* m_envhp;//OCI Env Handle
	OCISvcCtx* m_svchp;//OCI service Handle
	OCIError* m_errhp;//OCI Error Handle
	OCIServer* m_srvhp;//OCI server handle
	OCISession* m_authp;//OCI authentication handle
	bool m_autoCommit;
};

#endif // _OCI_CONNECTION_H_

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?