-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMydb3.cpp
72 lines (60 loc) · 1.34 KB
/
Mydb3.cpp
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
// Mydb3.cpp : implementation file
//
#include "stdafx.h"
#include "Person1.h"
#include "Mydb3.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// Mydb3
IMPLEMENT_DYNAMIC(Mydb3, CRecordset)
Mydb3::Mydb3(CDatabase* pdb)
: CRecordset(pdb)
{
//{{AFX_FIELD_INIT(Mydb3)
m_id = 0;
m_column1 = _T("");
m_column2 = _T("");
p2= _T("");
p3= _T("");
m_nParams =1;
m_nFields = 5;
//}}AFX_FIELD_INIT
m_nDefaultType = snapshot;
}
CString Mydb3::GetDefaultConnect()
{
return _T("ODBC;DSN=p1");
}
CString Mydb3::GetDefaultSQL()
{
return _T("[people]");
}
void Mydb3::DoFieldExchange(CFieldExchange* pFX)
{
//{{AFX_FIELD_MAP(Mydb3)
pFX->SetFieldType(CFieldExchange::outputColumn);
RFX_Int(pFX, _T("[id]"), m_id);
RFX_Text(pFX, _T("[ÐÕÃû]"), m_column1);
RFX_Text(pFX, _T("[¸Úλ]"), m_column2);
pFX->SetFieldType(CFieldExchange::param);
RFX_Text(pFX, _T("[ÐÕÃû]"), p2);
pFX->SetFieldType(CFieldExchange::param);
RFX_Text(pFX, _T("[¸Úλ]"), p3);
//}}AFX_FIELD_MAP
}
/////////////////////////////////////////////////////////////////////////////
// Mydb3 diagnostics
#ifdef _DEBUG
void Mydb3::AssertValid() const
{
CRecordset::AssertValid();
}
void Mydb3::Dump(CDumpContext& dc) const
{
CRecordset::Dump(dc);
}
#endif //_DEBUG