Добавил:
Studfiles2
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:Курсовой проект / Kyrsovik / TheOne / TheOneSet
.cpp// TheOneSet.cpp : implementation of the CTheOneSet class
//
#include "stdafx.h"
#include "TheOne.h"
#include "TheOneSet.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CTheOneSet implementation
// code generated on 27 мая 2006 г., 18:43
IMPLEMENT_DYNAMIC(CTheOneSet, CRecordset)
CTheOneSet::CTheOneSet(CDatabase* pdb)
: CRecordset(pdb)
{
m_cinema_id = 0;
m_cinema_name = L"";
m_cinema_address = L"";
m_cinema_about = L"";
m_nFields = 4;
m_nDefaultType = dynaset;
}
//#error Security Issue: The connection string may contain a password
// The connection string below may contain plain text passwords and/or
// other sensitive information. Please remove the #error after reviewing
// the connection string for any security related issues. You may want to
// store the password in some other form or use a different user authentication.
CString CTheOneSet::GetDefaultConnect()
{
return _T("DBQ=D:\\Projects\\cinema.mdb;DefaultDir=D:\\Projects;Driver={Microsoft Access Driver (*.mdb)};DriverId=25;FIL=MS Access;FILEDSN=D:\\Projects\\cinema.mdb.dsn;MaxBufferSize=2048;MaxScanRows=8;PageTimeout=5;SafeTransactions=0;Threads=3;UID=admin;UserCommitSync=Yes;");
}
CString CTheOneSet::GetDefaultSQL()
{
return _T("[CINEMA]");
}
void CTheOneSet::DoFieldExchange(CFieldExchange* pFX)
{
pFX->SetFieldType(CFieldExchange::outputColumn);
// Macros such as RFX_Text() and RFX_Int() are dependent on the
// type of the member variable, not the type of the field in the database.
// ODBC will try to automatically convert the column value to the requested type
RFX_Long(pFX, _T("[cinema_id]"), m_cinema_id);
RFX_Text(pFX, _T("[cinema_name]"), m_cinema_name);
RFX_Text(pFX, _T("[cinema_address]"), m_cinema_address);
RFX_Text(pFX, _T("[cinema_about]"), m_cinema_about);
}
/////////////////////////////////////////////////////////////////////////////
// CTheOneSet diagnostics
#ifdef _DEBUG
void CTheOneSet::AssertValid() const
{
CRecordset::AssertValid();
}
void CTheOneSet::Dump(CDumpContext& dc) const
{
CRecordset::Dump(dc);
}
#endif //_DEBUG
Соседние файлы в папке TheOne