home *** CD-ROM | disk | FTP | other *** search
- // MyRecordset3.cpp : implementation file
- //
-
- #include "stdafx.h"
- #include "odbc2.h"
- #include "MyRecordset3.h"
-
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
-
- /////////////////////////////////////////////////////////////////////////////
- // CMyRecordset3
-
- IMPLEMENT_DYNAMIC(CMyRecordset3, CRecordset)
-
- CMyRecordset3::CMyRecordset3(CDatabase* pdb)
- : CRecordset(pdb)
- {
- //{{AFX_FIELD_INIT(CMyRecordset3)
- m_ID = 0;
- m_Field1 = _T("");
- m_nFields = 2;
- //}}AFX_FIELD_INIT
- m_nDefaultType = snapshot;
-
- m_nParams= 1;
- }
-
-
- CString CMyRecordset3::GetDefaultConnect()
- {
- return _T("ODBC;DSN=TestDataSource");
- }
-
- CString CMyRecordset3::GetDefaultSQL()
- {
- return _T("{call Query1(?)}");
- }
-
- void CMyRecordset3::DoFieldExchange(CFieldExchange* pFX)
- {
- //{{AFX_FIELD_MAP(CMyRecordset3)
- pFX->SetFieldType(CFieldExchange::outputColumn);
- RFX_Long(pFX, _T("[ID]"), m_ID);
- RFX_Text(pFX, _T("[Field1]"), m_Field1);
- //}}AFX_FIELD_MAP
- pFX->SetFieldType( CFieldExchange::inputParam );
- RFX_Long(pFX, _T(""), m_IDParam);
- }
-
- /////////////////////////////////////////////////////////////////////////////
- // CMyRecordset3 diagnostics
-
- #ifdef _DEBUG
- void CMyRecordset3::AssertValid() const
- {
- CRecordset::AssertValid();
- }
-
- void CMyRecordset3::Dump(CDumpContext& dc) const
- {
- CRecordset::Dump(dc);
- }
- #endif //_DEBUG
-