⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ociexampledlg.h

📁 这是书上的代码
💻 H
字号:
// OCIExampleDlg.h : header file
//
#include "CInsertDlg.h"

#if !defined(AFX_OCIEXAMPLEDLG_H__0E848200_58C2_432F_BB46_CD6953E269AE__INCLUDED_)
#define AFX_OCIEXAMPLEDLG_H__0E848200_58C2_432F_BB46_CD6953E269AE__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// COCIExampleDlg dialog
#include "oci.h"
#include "ConectDlg.h"

class COCIExampleDlg : public CDialog
{
// Construction
public:
	COCIExampleDlg(CWnd* pParent = NULL);	// standard constructor
    virtual ~COCIExampleDlg();

// Dialog Data
	//{{AFX_DATA(COCIExampleDlg)
	enum { IDD = IDD_OCIEXAMPLE_DIALOG };
	CComboBox	m_comConFNameCtrl;
	CComboBox	m_comboCtrl;
	CListCtrl	m_listCtrl;
	CListBox	m_listTablename;
	CString	m_strTablename;
	CString	m_strFieldName;
	CString	m_strcondition;
	CString	m_strFieldVal;
	CString	m_strConFName;
	CString	m_strConFVal;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(COCIExampleDlg)
	public:
	virtual BOOL DestroyWindow();
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(COCIExampleDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnButConnectdb();
	afx_msg void OnBTableselectok();
	afx_msg void OnButQuery();
	afx_msg void OnButDelete();
	afx_msg void OnButUpdate();
	afx_msg void OnButInsert();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
public:
	void SaveInsertData(int row,int col,CString strColVal[]);
	void ErrorProc(dvoid *err, sword status);
	//代码4.1.1:
	OCIEnv        *envhp;//环境句柄
	OCIServer     *srvhp;//服务器句柄
	OCISvcCtx     *svchp;//服务环境句柄
	OCIError      *errhp;//错误句柄
	OCISession    *authp;//会话句柄
	OCIStmt       *stmthp;//语句句柄
	OCIDescribe   *dschp;//描述句柄
	//代码4.4.1:
	OCIDefine *defhp[20];//定义句柄
	OCIBind   *bidhp[20];//绑定句柄
	OCIParam *colhp;     //参数描述符
	ub2 collen[30]; //列长度
	ub2 coltype[30];//列类型 
    //存放SELECT语句选中的列数据
	text* colbuf[30];
	sb2 ind[30];//指示符变量
	//代码5
	//存储表的字段名称
	CString ColName[50];
	//存储字段的的数据类型
	CString ColType[50];
	//存储表的字段值
	CString ColVal[50][500];
	//字段的数目
	int ColumnNumbers;
	//所选中表的名称
	CString TableName;
	//8.1
	CCInsertDlg  *InsertDlg;
	//字段的总长度
	int iprecision[50];
	//字段的小数位数
    int      iscale[5];
	//
	int IsSizeInsertDlg;
	
		/*
	  ub1       precision;  //typedef unsigned char  ub1;                   
	  sb1       scale;  //typedef   signed char  sb1;  
   

  */

};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_OCIEXAMPLEDLG_H__0E848200_58C2_432F_BB46_CD6953E269AE__INCLUDED_)

⌨️ 快捷键说明

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