-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCustomInitSet.cpp
More file actions
76 lines (63 loc) · 2.32 KB
/
CustomInitSet.cpp
File metadata and controls
76 lines (63 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// CustomInitSet.h : Implementation of the CCustomInitSet class
// CCustomInitSet implementation
#include "stdafx.h"
#include "CustomInitSet.h"
IMPLEMENT_DYNAMIC(CCustomInitSet, CRecordset)
CCustomInitSet::CCustomInitSet(CDatabase* pdb)
: CRecordset(pdb)
{
m_SIG_Station = L"";
m_Year = 0;
m_GreenJulian;
m_StartKBDI = 0;
m_Start1000 = 0.0;
m_FFMC = 0.0;
m_DMC = 0.0;
m_DC = 0.0;
m_StartUpDay;
m_Enabled;
m_nFields = 10;
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 CCustomInitSet::GetDefaultConnect()
{
return _T("");//_T("DBQ=F:\\Source\\FFP4\\Data\\r1_short.mdb;DefaultDir=F:\\Source\\FFP4\\Data;Driver={Microsoft Access Driver (*.mdb)};DriverId=281;FIL=MS Access;FILEDSN=C:\\Program Files\\Common Files\\ODBC\\Data Sources\\ffp.dsn;MaxBufferSize=2048;MaxScanRows=8;PageTimeout=5;SafeTransactions=0;Threads=3;UID=admin;UserCommitSync=Yes;");
}
CString CCustomInitSet::GetDefaultSQL()
{
return _T("[ffpInit]");
}
void CCustomInitSet::DoFieldExchange(CFieldExchange* pFX)
{
pFX->SetFieldType(CFieldExchange::outputColumn);
// Macros such as RFX_Text() and RFX_Long () 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_Text(pFX, _T("[SIG_Station]"), m_SIG_Station);
RFX_Long (pFX, _T("[Year]"), m_Year);
RFX_Date(pFX, _T("[GreenJulian]"), m_GreenJulian);
RFX_Long (pFX, _T("[StartKBDI]"), m_StartKBDI);
RFX_Single(pFX, _T("[Start1000]"), m_Start1000);
RFX_Single(pFX, _T("[FFMC]"), m_FFMC);
RFX_Single(pFX, _T("[DMC]"), m_DMC);
RFX_Single(pFX, _T("[DC]"), m_DC);
RFX_Bool(pFX, _T("[Enabled]"), m_Enabled);
RFX_Date(pFX, _T("[StartUpDay]"), m_StartUpDay);
}
/////////////////////////////////////////////////////////////////////////////
// CCustomInitSet diagnostics
#ifdef _DEBUG
void CCustomInitSet::AssertValid() const
{
CRecordset::AssertValid();
}
void CCustomInitSet::Dump(CDumpContext& dc) const
{
CRecordset::Dump(dc);
}
#endif //_DEBUG