You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.4 KiB
C++
54 lines
1.4 KiB
C++
// MyRS.h: interface for the CMyRS class.
|
|
//
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
#if !defined(AFX_MYRS_H__EC9EB429_3D22_4706_9BA9_CC03549F63C0__INCLUDED_)
|
|
#define AFX_MYRS_H__EC9EB429_3D22_4706_9BA9_CC03549F63C0__INCLUDED_
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif // _MSC_VER > 1000
|
|
|
|
#include <afxdao.h>
|
|
|
|
#ifdef BUILD_UTILITYDLL
|
|
#define UTILITYDLL __declspec(dllexport)
|
|
#else
|
|
#define UTILITYDLL __declspec(dllimport)
|
|
#endif
|
|
|
|
class UTILITYDLL CMyRS
|
|
{
|
|
public:
|
|
// default constructor
|
|
CMyRS();
|
|
|
|
// default destructor
|
|
virtual ~CMyRS();
|
|
|
|
// get field value in recordset
|
|
static COleVariant GetFieldValue(const char *ccsDbFileName, const char *ccsTableName,
|
|
const char *ccsFieldName, short &nDbDataType);
|
|
|
|
// open record set and database
|
|
void Open(const char *ccsDbFileName, const char *ccsTableName);
|
|
|
|
// Set field value. If no record add a new record
|
|
void SetFieldValue(LPCTSTR lpszName, LPCTSTR lpszValue);
|
|
|
|
// Get record count
|
|
static bool GetRecCnt(int &iCnt, const char *ccsDbFile, const char *ccsTable);
|
|
|
|
// return true if database is opened
|
|
bool IsOpen();
|
|
|
|
// close database if database is opened
|
|
void Close();
|
|
|
|
private:
|
|
CDaoDatabase m_db;
|
|
CDaoRecordset m_rs;
|
|
};
|
|
|
|
#endif // !defined(AFX_MYRS_H__EC9EB429_3D22_4706_9BA9_CC03549F63C0__INCLUDED_)
|