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.
kev/Drawer/SSBase/DrawOperator/RecordsetDynamicBind.h

68 lines
1.6 KiB
C

1 month ago
//////////////////////////////////////////////////////////////////////////////
//<2F>ļ<EFBFBD> RecordsetDynamicBind.h
//<2F><>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD>:
//
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д: 2005-12-07
/////////////////////////////////////////////////////////////////////////////
#pragma once
#include "afxdb.h"
namespace NOperatorDB
{
class CRecordsetDynamicBind :
public CRecordset
{
DECLARE_DYNAMIC(CRecordsetDynamicBind)
public:
CRecordsetDynamicBind(CDatabase* pDatabase = NULL);
~CRecordsetDynamicBind(void);
//<2F><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>̬<EFBFBD>󶨵<EFBFBD><F3B6A8B5><EFBFBD><EFBFBD><EFBFBD>,<2C><>Щ<EFBFBD><D0A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD>Open֮ǰClose״̬<D7B4><CCAC>ʹ<EFBFBD><CAB9>
void SetDefaultConnect(LPCTSTR lpszConnect);
void SetTableName(LPCTSTR lpszTableName);
BOOL AddBindField(LPCTSTR lpszFieldName, int nFieldType);
void SetFieldValue(int nIndex, CString strValue);
CString GetFieldValue(int nIndex);
ULONGLONG SetLongBinaryFieldValue(int nIndex, CString strFileName); //<2F><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>
BOOL GetLongBinaryFieldValue(int nIndex, CString strFileName);
BOOL RemoveBindField(CString strFieldName);
BOOL RemoveBindField(int nIndex);
void RemoveAllField(void);
static bool IsLongBinaryField(int nFieldType);
protected:
class CField
{
public:
CField() {nType=0; name=_T("");}
int nType;
CString name;
};
CPtrArray m_ptrFieldName;
CPtrArray m_ptrFieldValue;
CString m_strTableName;
CString m_strConnect;
void ToDateTime(CString& strValue, CTime& time);
// Implementation
protected:
virtual CString GetDefaultConnect(); // Default connection string
virtual CString GetDefaultSQL(); // default SQL for Recordset
virtual void DoFieldExchange(CFieldExchange* pFX); // RFX support
};
};
using namespace NOperatorDB;