// LibrarySet.cpp : implementation file
//

#include "stdafx.h"
#include "ex30a.h"
#include "LibrarySet.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CLibrarySet

IMPLEMENT_DYNAMIC(CLibrarySet, CDaoRecordset)

CLibrarySet::CLibrarySet(CDaoDatabase* pdb)
	: CDaoRecordset(pdb)
{
	//{{AFX_FIELD_INIT(CLibrarySet)
	m_ItemID = 0;
	m_Text = _T("");
	m_PageNumber = 0;
	m_ParentItem = 0;
	m_PageNumber2 = 0;
	m_ImageNumber = 0;
	m_Name = _T("");
	m_NoteFlag = FALSE;
	m_Note = _T("");
	m_Type = 0;
	m_SmallSize = 0;
	m_LargeSize = 0;
	m_SmallWidth = 0;
	m_SmallHeight = 0;
	m_LargeWidth = 0;
	m_LargeHeight = 0;
	m_ID = 0;
	m_Word = _T("");
	m_Chapter = 0;
	m_Context = _T("");
	m_PageNumber3 = 0;
	m_Text2 = _T("");
	m_nFields = 24;
	//}}AFX_FIELD_INIT
	m_nDefaultType = dbOpenDynaset;
}


CString CLibrarySet::GetDefaultDBName()
{
	return _T("E:\\Programación Enero 98\\Proyectos\\InternetServer\\ITBLibrary.mdb");
}

CString CLibrarySet::GetDefaultSQL()
{
	return _T("[Contents],[Images],[Index],[Pages]");
}

void CLibrarySet::DoFieldExchange(CDaoFieldExchange* pFX)
{
	//{{AFX_FIELD_MAP(CLibrarySet)
	pFX->SetFieldType(CDaoFieldExchange::outputColumn);
	DFX_Long(pFX, _T("[ItemID]"), m_ItemID);
	DFX_Text(pFX, _T("[Contents].[Text]"), m_Text);
	DFX_Long(pFX, _T("[Contents].[PageNumber]"), m_PageNumber);
	DFX_Long(pFX, _T("[ParentItem]"), m_ParentItem);
	DFX_Long(pFX, _T("[Images].[PageNumber]"), m_PageNumber2);
	DFX_Long(pFX, _T("[ImageNumber]"), m_ImageNumber);
	DFX_Text(pFX, _T("[Name]"), m_Name);
	DFX_Bool(pFX, _T("[NoteFlag]"), m_NoteFlag);
	DFX_Text(pFX, _T("[Note]"), m_Note);
	DFX_Byte(pFX, _T("[Type]"), m_Type);
	DFX_LongBinary(pFX, _T("[SmallImage]"), m_SmallImage);
	DFX_LongBinary(pFX, _T("[LargeImage]"), m_LargeImage);
	DFX_Long(pFX, _T("[SmallSize]"), m_SmallSize);
	DFX_Long(pFX, _T("[LargeSize]"), m_LargeSize);
	DFX_Long(pFX, _T("[SmallWidth]"), m_SmallWidth);
	DFX_Long(pFX, _T("[SmallHeight]"), m_SmallHeight);
	DFX_Long(pFX, _T("[LargeWidth]"), m_LargeWidth);
	DFX_Long(pFX, _T("[LargeHeight]"), m_LargeHeight);
	DFX_Long(pFX, _T("[ID]"), m_ID);
	DFX_Text(pFX, _T("[Word]"), m_Word);
	DFX_Long(pFX, _T("[Chapter]"), m_Chapter);
	DFX_Text(pFX, _T("[Context]"), m_Context);
	DFX_Long(pFX, _T("[Pages].[PageNumber]"), m_PageNumber3);
	DFX_Text(pFX, _T("[Pages].[Text]"), m_Text2);
	//}}AFX_FIELD_MAP
}

/////////////////////////////////////////////////////////////////////////////
// CLibrarySet diagnostics

#ifdef _DEBUG
void CLibrarySet::AssertValid() const
{
	CDaoRecordset::AssertValid();
}

void CLibrarySet::Dump(CDumpContext& dc) const
{
	CDaoRecordset::Dump(dc);
}
#endif //_DEBUG

void CLibrarySet::GetImageHeaders()
{
	CLibrarySet set;



}
