adodbhandler.h

来自「vc在线考试系统源码」· C头文件 代码 · 共 51 行

H
51
字号
/*********************************************************
@author  Chandar
@version 1.0
Development Environment        :  Visual C++ 6.0
Name of the File               :  ADODBHandler.h
Creation/Modification History  :
                                  01-Aug-2001     Created

File Overview

This file declares the class for handling database functions
of the application
*************************************************************/




//Import the msado15.dll so as to use the ADO functionality in the application
//Rename EOF for ADO objects to prevent clash with other objects
#import "c:\program files\common files\system\ado\msado15.dll" no_namespace rename("EOF", "adoEOF")


//ADODBHandler class definition
class ADODBHandler  
{
//Attributes
private:
    
    // Singleton variable
    static BOOL m_bDatabaseOpen;

public:
     // COM smart pointers for ADO functions
     _ConnectionPtr m_cpConnection;
	 
	 CString strCurAppPath; //variable to store application path

	 //Constructor declaration
	 ADODBHandler();
     
	 //Function declarations for communicating to database
	 BOOL OpenDatabase();
     _RecordsetPtr GetProductNames();
     BOOL  GetImage(int p_productid);
	 BOOL SetImage(int p_productid,_bstr_t p_image);
	 void CloseDatabase();

	 //Destructor declaration
     virtual ~ADODBHandler();
     
};

⌨️ 快捷键说明

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