#include "stdafx.h"
#include "ChatSet.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif

IMPLEMENT_DYNAMIC(CChatSet, CRecordset)

CChatSet::CChatSet(CDatabase* pdb)
	: CRecordset(pdb)
{

	m_IDName = _T("");
	m_OnLine = FALSE;
	m_IPAddr = _T("");
	m_Password = _T("");
	m_NickName = _T("");
	m_Sex = _T("");
	m_Tel = _T("");
	m_Address = _T("");
	m_Email = _T("");
	m_Color = _T("");
	m_nFields = 10;
	m_nDefaultType = dynaset;
}

CString CChatSet::GetDefaultConnect()
{
	return _T("ODBC;DSN=Member;");
}

CString CChatSet::GetDefaultSQL()
{
	return _T("[Table]");
}

void CChatSet::DoFieldExchange(CFieldExchange* pFX)
{
	pFX->SetFieldType(CFieldExchange::outputColumn);
	RFX_Text(pFX, _T("[ID_Name]"), m_IDName);
	RFX_Int(pFX, _T("[Online]"), m_OnLine);
	RFX_Text(pFX, _T("[IP_address]"), m_IPAddr);
	RFX_Text(pFX, _T("[Password]"), m_Password);
	RFX_Text(pFX, _T("[Sex]"), m_Sex);
	RFX_Text(pFX, _T("[Nick_Name]"), m_NickName);
	RFX_Text(pFX, _T("[Color]"), m_Color);
	RFX_Text(pFX, _T("[Tel]"), m_Tel);
	RFX_Text(pFX, _T("[Address]"), m_Address);
	RFX_Text(pFX, _T("[E-mail]"), m_Email);
}

#ifdef _DEBUG
void CChatSet::AssertValid() const
{
  CRecordset::AssertValid();
}

void CChatSet::Dump(CDumpContext& dc)const
{
  CRecordset::Dump(dc);
}
#endif