You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
616 B

// OracleDB.h
#ifndef ORACLEDB_H
#define ORACLEDB_H
#ifdef __cplusplus
extern "C" {
#endif
#include "ocilib2.h"
#ifdef __cplusplus
}
#endif
class OracleDB {
private:
OCI_Connection* conn;
OCI_Statement* stmt;
bool isConnected;
public:
OracleDB();
~OracleDB();
// 连接数据库
bool OracleDB::connect(const char* user, const char* pwd, const char* host);
// 执行查询,按你要求的接口
int executeQuery(
const char* sql,
int* outputColumn,
int* outputRow,
char**** outputValue
);
// 断开连接
void disconnect();
};
#endif // ORACLEDB_H