DAO.CPP
上传用户:szcysw
上传日期:2013-03-11
资源大小:6752k
文件大小:2k
- // DAO.cpp: implementation of the CDAO class.
- //
- //////////////////////////////////////////////////////////////////////
- #include "stdafx.h"
- #include "DAO.h"
- //////////////////////////////////////////////////////////////////////
- // Construction/Destruction
- //////////////////////////////////////////////////////////////////////
- // DaoRecordsetEmployees.cpp : implementation file
- //
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CDaoSFs
- IMPLEMENT_DYNAMIC(CDaoSF, CDaoRecordset)
- CDaoSF::CDaoSF(CDaoDatabase* pdb):CDaoRecordset(pdb)
- {
- //{{AFX_FIELD_INIT(CDaoSFs)
- m_num = 0.0;
- m_file_num = _T("");
- m_fileName = _T("");
- m_content = _T("");
- m_cata = _T("");
- m_pub_time = _T("");
- m_nFields = 6;
- m_nDefaultType = dbOpenDynaset;
- }
- CString CDaoSF::GetDefaultDBName()
- {
- CString path;
- TCHAR s[MAX_PATH];
- //获取当前程序运行目录
- GetModuleFileName(NULL,s,MAX_PATH);
- TCHAR szDir[MAX_PATH];
- TCHAR szDrv[MAX_PATH];
- //解析目录
- _splitpath(s,szDrv,szDir,NULL,NULL);
- //数据库名=目录+数据库名
- path=(CString)szDrv+(CString)szDir;
- path+="taxexpert.dat";
- return path;
- }
- CString CDaoSF::GetDefaultSQL()
- {
- return _T("[税法]");
- }
- void CDaoSF::DoFieldExchange(CDaoFieldExchange* pFX)
- {
- pFX->SetFieldType(CDaoFieldExchange::outputColumn);
- DFX_Double(pFX, _T("[num]"), m_num);
- DFX_Text(pFX, _T("[file_num]"), m_file_num);
- DFX_Text(pFX, _T("[fileName]"), m_fileName);
- DFX_Text(pFX, _T("[content]"), m_content);
- DFX_Text(pFX, _T("[cata]"), m_cata);
- DFX_Text(pFX, _T("[pub_time]"), m_pub_time);
- //}}AFX_FIELD_MAP
- }
- /////////////////////////////////////////////////////////////////////////////
- // CDaoSFs diagnostics
- #ifdef _DEBUG
- void CDaoSF::AssertValid() const
- {
- CDaoRecordset::AssertValid();
- }
- void CDaoSF::Dump(CDumpContext& dc) const
- {
- CDaoRecordset::Dump(dc);
- }
- #endif //_DEBUG