-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCountySet.cpp
More file actions
65 lines (52 loc) · 1.98 KB
/
CountySet.cpp
File metadata and controls
65 lines (52 loc) · 1.98 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
// CountySet.h : Implementation of the CCountySet class
// CCountySet implementation
// code generated on Wednesday, September 28, 2005, 1:50 PM
#include "stdafx.h"
#include "CountySet.h"
IMPLEMENT_DYNAMIC(CCountySet, CRecordset)
CCountySet::CCountySet(CDatabase* pdb)
: CRecordset(pdb)
{
m_State = L"";
m_CountyID = 0;
m_CountyName = L"";
m_StateCode = 0;
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 CCountySet::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 CCountySet::GetDefaultSQL()
{
return _T("[refCounty]");
}
void CCountySet::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("[State]"), m_State);
RFX_Long(pFX, _T("[CountyID]"), m_CountyID);
RFX_Text(pFX, _T("[CountyName]"), m_CountyName);
RFX_Long(pFX, _T("[StateCode]"), m_StateCode);
}
/////////////////////////////////////////////////////////////////////////////
// CCountySet diagnostics
#ifdef _DEBUG
void CCountySet::AssertValid() const
{
CRecordset::AssertValid();
}
void CCountySet::Dump(CDumpContext& dc) const
{
CRecordset::Dump(dc);
}
#endif //_DEBUG