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

📄 olehandler.h

📁 从vc连接到oracle数据库。包括连接
💻 H
字号:
/*********************************************************
@author  Chandar
@version 1.0
Development Environment        :  Visual C++ 6.0
Name of the File               :  OLEHandler.h
Creation/Modification History  :
                                  07-Aug-2001     Created

File Overview

This file declares the class for handling database functions
of the application
*************************************************************/
#include <windows.h>
#include <stdio.h>
#include <tchar.h>
#include <stddef.h>
#include <iostream.h>
       
// OLE DB Header Files
#include <oledb.h>
#include <oledberr.h>

class DBHandler
{

public:
   DBHandler();
   
   //Function to communicate to database
   void InitializeAndEstablishConnection();
   void InsertData(int p_productname,CString  p_language,CString p_tname,CString p_tdescription);
   IRowset* ExecuteQuery(CString wCmdString);
   IMultipleResults* GetProductInformation();
   HRESULT DispErrorInfo(IUnknown *pErrorInt, GUID ErrorIID);
   void UnInitialize();

    //Declaration of interface pointer variables
    IDBInitialize*      pIDBInitialize ;         
    IDBCreateSession*   pIDBCreateSession ;      
    IDBCreateCommand*   pIDBCreateCommand ;      
    ICommandText*       pICommandText;           
    IRowset*            pRowset  ;               
    ICommandWithParameters* pICommandWithParams ;
	ICommandProperties *pICommandProperties;      
    IAccessor*          pIAccessor ;             
    IDBProperties*      pIDBProperties ;        
	IMultipleResults*   pIMultipleResults ;     
    IColumnsInfo*       pColumnsInfo;

    DBCOLUMNINFO*       pDBColumnInfo;
    HACCESSOR           hAccessor;
    DBBINDING*          pBindings;
    ULONG               cbColOffset,lNumCols;
    WCHAR*              pStringsBuffer;
   
    ULONG               i,j;
    ULONG               lNumRowsRetrieved;
    HROW                hRows[5];
    HROW*               pRows;
	LONG                cNumRows;
    DBPARAMS            Params;
   
};

⌨️ 快捷键说明

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