資源簡介
該程序使用ODBC技術對Access數據庫進行操作,包括增、刪、改、查、以及定位到第一條記錄、下一條記錄、上一條記錄和最后一條記錄,是一個很好的學習ODBC技術的Demo!

代碼片段和文件信息
//?ODBCDemo.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“ODBCDemo.h“
#include?“ODBCDemoDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CODBCDemoApp
BEGIN_MESSAGE_MAP(CODBCDemoApp?CWinApp)
//{{AFX_MSG_MAP(CODBCDemoApp)
//?NOTE?-?the?ClassWizard?will?add?and?remove?mapping?macros?here.
//????DO?NOT?EDIT?what?you?see?in?these?blocks?of?generated?code!
//}}AFX_MSG
ON_COMMAND(ID_HELP?CWinApp::onhelp)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CODBCDemoApp?construction
CODBCDemoApp::CODBCDemoApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CODBCDemoApp?object
CODBCDemoApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CODBCDemoApp?initialization
BOOL?CODBCDemoApp::InitInstance()
{
AfxEnableControlContainer();
//?Standard?initialization
//?If?you?are?not?using?these?features?and?wish?to?reduce?the?size
//??of?your?final?executable?you?should?remove?from?the?following
//??the?specific?initialization?routines?you?do?not?need.
#ifdef?_AFXDLL
Enable3dControls(); //?Call?this?when?using?MFC?in?a?shared?DLL
#else
Enable3dControlsStatic(); //?Call?this?when?linking?to?MFC?statically
#endif
CODBCDemoDlg?dlg;
m_pMainWnd?=?&dlg;
int?nResponse?=?dlg.DoModal();
if?(nResponse?==?IDOK)
{
//?TODO:?Place?code?here?to?handle?when?the?dialog?is
//??dismissed?with?OK
}
else?if?(nResponse?==?IDCANCEL)
{
//?TODO:?Place?code?here?to?handle?when?the?dialog?is
//??dismissed?with?Cancel
}
//?Since?the?dialog?has?been?closed?return?FALSE?so?that?we?exit?the
//??application?rather?than?start?the?application‘s?message?pump.
return?FALSE;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????3294208??2013-04-12?22:45??ODBCDemo\Debug\ODBCDemo.bsc
?????文件?????114753??2013-04-12?22:45??ODBCDemo\Debug\ODBCDemo.exe
?????文件?????233924??2013-04-12?22:45??ODBCDemo\Debug\ODBCDemo.ilk
?????文件??????12722??2013-04-12?22:45??ODBCDemo\Debug\ODBCDemo.obj
?????文件????7171220??2013-04-12?22:45??ODBCDemo\Debug\ODBCDemo.pch
?????文件?????304128??2013-04-12?22:45??ODBCDemo\Debug\ODBCDemo.pdb
?????文件???????3244??2013-04-12?22:45??ODBCDemo\Debug\ODBCDemo.res
?????文件??????????0??2013-04-12?22:45??ODBCDemo\Debug\ODBCDemo.sbr
?????文件??????39272??2013-04-12?22:45??ODBCDemo\Debug\ODBCDemoDlg.obj
?????文件??????????0??2013-04-12?22:45??ODBCDemo\Debug\ODBCDemoDlg.sbr
?????文件??????16674??2013-04-12?22:45??ODBCDemo\Debug\RecordsetChild.obj
?????文件??????????0??2013-04-12?22:45??ODBCDemo\Debug\RecordsetChild.sbr
?????文件?????107338??2013-04-12?22:45??ODBCDemo\Debug\StdAfx.obj
?????文件????1455426??2013-04-12?22:45??ODBCDemo\Debug\StdAfx.sbr
?????文件?????205824??2013-04-12?22:45??ODBCDemo\Debug\vc60.idb
?????文件?????364544??2013-04-12?22:45??ODBCDemo\Debug\vc60.pdb
?????文件??????36596??2013-04-12?19:16??ODBCDemo\ODBCDemo.aps
?????文件???????2340??2013-04-12?22:45??ODBCDemo\ODBCDemo.clw
?????文件???????2091??2013-04-12?15:18??ODBCDemo\ODBCDemo.cpp
?????文件???????4339??2013-04-12?16:28??ODBCDemo\ODBCDemo.dsp
?????文件????????541??2013-04-12?15:18??ODBCDemo\ODBCDemo.dsw
?????文件???????1346??2013-04-12?15:18??ODBCDemo\ODBCDemo.h
?????文件?????151552??2013-04-12?19:23??ODBCDemo\odbcdemo.mdb
?????文件??????58368??2013-04-12?22:45??ODBCDemo\ODBCDemo.ncb
?????文件??????55808??2013-04-12?22:45??ODBCDemo\ODBCDemo.opt
?????文件???????2105??2013-04-12?22:45??ODBCDemo\ODBCDemo.plg
?????文件???????6401??2013-04-12?19:16??ODBCDemo\ODBCDemo.rc
?????文件???????8665??2013-04-12?22:44??ODBCDemo\ODBCDemoDlg.cpp
?????文件???????1799??2013-04-12?22:29??ODBCDemo\ODBCDemoDlg.h
?????文件???????3615??2013-04-12?15:18??ODBCDemo\ReadMe.txt
............此處省略14個文件信息
評論
共有 條評論