www.pudn.com > ImageServU.rar > Zimages.cpp
// Zimages.cpp : implementation file
//
#include "stdafx.h"
#include "Zimages.h"
#include "bompdmcomm.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CZimages
IMPLEMENT_DYNAMIC(CZimages, CRecordset)
CZimages::CZimages(CDatabase* pdb)
: CRecordset(pdb)
{
//{{AFX_FIELD_INIT(CZimages)
m_image_id = 0;
m_cat_id = 0;
m_user_id = 0;
m_image_name = _T("");
m_image_description = _T("");
m_image_keywords = _T("");
m_image_date = 0;
m_image_active = 0;
m_image_media_file = _T("");
m_image_thumb_file = _T("");
m_image_download_url = _T("");
m_image_allow_comments = 0;
m_image_comments = 0;
m_image_downloads = 0;
m_image_votes = 0;
m_image_rating = 0.0;
m_image_hits = 0;
m_sublib = _T("");
m_nFields = 18;
//}}AFX_FIELD_INIT
m_nDefaultType = snapshot;
}
CString CZimages::GetDefaultConnect()
{
CString sDsn;
sDsn.Format("ODBC;%s",PDMDSN);
return sDsn;
}
CString CZimages::GetDefaultSQL()
{
return _T("[4images_images]");
}
void CZimages::DoFieldExchange(CFieldExchange* pFX)
{
//{{AFX_FIELD_MAP(CZimages)
pFX->SetFieldType(CFieldExchange::outputColumn);
RFX_Long(pFX, _T("[image_id]"), m_image_id);
RFX_Long(pFX, _T("[cat_id]"), m_cat_id);
RFX_Long(pFX, _T("[user_id]"), m_user_id);
RFX_Text(pFX, _T("[image_name]"), m_image_name);
RFX_Text(pFX, _T("[image_description]"), m_image_description);
RFX_Text(pFX, _T("[image_keywords]"), m_image_keywords);
RFX_Long(pFX, _T("[image_date]"), m_image_date);
RFX_Long(pFX, _T("[image_active]"), m_image_active);
RFX_Text(pFX, _T("[image_media_file]"), m_image_media_file);
RFX_Text(pFX, _T("[image_thumb_file]"), m_image_thumb_file);
RFX_Text(pFX, _T("[image_download_url]"), m_image_download_url);
RFX_Long(pFX, _T("[image_allow_comments]"), m_image_allow_comments);
RFX_Long(pFX, _T("[image_comments]"), m_image_comments);
RFX_Long(pFX, _T("[image_downloads]"), m_image_downloads);
RFX_Long(pFX, _T("[image_votes]"), m_image_votes);
RFX_Double(pFX, _T("[image_rating]"), m_image_rating);
RFX_Long(pFX, _T("[image_hits]"), m_image_hits);
RFX_Text(pFX, _T("[sublib]"), m_sublib);
//}}AFX_FIELD_MAP
}
/////////////////////////////////////////////////////////////////////////////
// CZimages diagnostics
#ifdef _DEBUG
void CZimages::AssertValid() const
{
CRecordset::AssertValid();
}
void CZimages::Dump(CDumpContext& dc) const
{
CRecordset::Dump(dc);
}
#endif //_DEBUG