📄 olehandler.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 + -