📄 oradblib.h
字号:
// OraDblib.h: interface for the CDblib class.
//
//////////////////////////////////////////////////////////////////////
#ifndef _ORADBLIB_H_
#define _ORADBLIB_H_
#include "oci.h"
#include "tagdblib.h"
#ifdef __BORLANDC__
#include "windows.h"
#else
#include "stdafx.h"
#endif
class COraDblib
{
public:
COraDblib();
virtual ~COraDblib();
bool Open(const char *databaseName, const char *loginID, const char *passWord, const char *appName = NULL, const char *hostname = NULL );
bool Use(const char *PackageName);
public:
static int m_opennum;
static FILE* m_fp;
bool enddebug();
bool sqldebug();
bool m_Reconnect;
bool Run20Message(const char *CommandStr, ...);
bool Run20Error(const char *CommandStr, ...);
bool Run20(const char *CommandStr, ...);
bool Run10(const char *CommandStr, ...);
bool __Run20(const char *CommandStr);
bool __Run10(const char *CommandStr);
bool Run(const char* CommandStr, ... );
bool __Run__(const char *CommandStr);
bool __Run(const char *CommandStr);
char* GetColData( int index );
char* GetColData(const char* colName);
bool MoveNext();
bool Close();
bool Cancel();
const char* GetErrorMsg();
int GetErrorCode();
const char * GetLoginID();
int GetColCount();
int GetRowCount();
const SDBCOL * GetColInfo(const char * colName);
const SDBCOL * GetColInfo(int index);
private:
bool Reconnect();
static int m_refNameSize;
static tagRefName m_refName[700];
static int m_usenum;
bool readPackName( const char* CommandStr);
bool m_usecursor;
bool OCIInit();
ub4 m_iters;
char m_packageName[20];
bool BindParam(const char* CommandStr);
void ErrorProc( dvoid *errhp, sword status );
bool Init();
bool Bind();
void API_ltrim(char *s);
void API_rtrim(char *s);
int API_Spaces(char *p);
ub4 m_colCount;
char m_data[MAX_COLNUM][DBMAXCHAR];
sb2 m_ind[MAX_COLNUM];
bool m_loginOK;
unsigned long m_rowCount;
int m_errorCode;
char m_errorMsg[81];
SDBCOL m_colInfo[MAX_COLNUM];
char m_serverName[MAXSERVERNAME + 1];
char m_loginID[MAXSERVERNAME + 1];
char m_passWord[MAXSERVERNAME + 1];
char m_appName[MAXSERVERNAME + 1];
char m_hostName[MAXSERVERNAME + 1];
char m_databaseName[DBMAXCHAR + 1];
OCIBind* m_bnd1p;
OCIBind* m_bnd2p;
OCIBind* m_bnd3p;
OCIDefine* m_defhp[MAX_COLNUM];
OCIServer* m_srvhp;
OCISvcCtx* m_svchp;
OCIParam* m_colhp;
OCIStmt* m_stmthp;
OCIStmt* m_curstmthp;
OCIStmt* m_tempstmthp;
OCISession* m_authp;
OCIError* m_errhp;
OCIEnv* m_envhp;
};
inline const char * COraDblib::GetLoginID()
{
return m_loginID;
}
inline int COraDblib::GetColCount()
{
return m_colCount;
}
inline int COraDblib::GetRowCount()
{
return m_rowCount;
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -