資源簡(jiǎn)介
vc6操作數(shù)據(jù)庫,從數(shù)據(jù)庫到listbox讀寫數(shù)據(jù)。自己的測(cè)試代碼,保證能用。

代碼片段和文件信息
//?database.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“database.h“
#include?“MainFrm.h“
#include?“databaseDoc.h“
#include?“databaseView.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CDatabaseApp
BEGIN_MESSAGE_MAP(CDatabaseApp?CWinApp)
//{{AFX_MSG_MAP(CDatabaseApp)
ON_COMMAND(ID_APP_ABOUT?OnAppAbout)
//?NOTE?-?the?ClassWizard?will?add?and?remove?mapping?macros?here.
//????DO?NOT?EDIT?what?you?see?in?these?blocks?of?generated?code!
//}}AFX_MSG_MAP
//?Standard?file?based?document?commands
ON_COMMAND(ID_FILE_NEW?CWinApp::OnFileNew)
ON_COMMAND(ID_FILE_OPEN?CWinApp::OnFileOpen)
//?Standard?print?setup?command
ON_COMMAND(ID_FILE_PRINT_SETUP?CWinApp::OnFilePrintSetup)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CDatabaseApp?construction
CDatabaseApp::CDatabaseApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CDatabaseApp?object
CDatabaseApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CDatabaseApp?initialization
BOOL?CDatabaseApp::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
//?Change?the?registry?key?under?which?our?settings?are?stored.
//?TODO:?You?should?modify?this?string?to?be?something?appropriate
//?such?as?the?name?of?your?company?or?organization.
SetRegistryKey(_T(“Local?AppWizard-Generated?Applications“));
LoadStdProfileSettings();??//?Load?standard?INI?file?options?(including?MRU)
//?Register?the?application‘s?document?templates.??Document?templates
//??serve?as?the?connection?between?documents?frame?windows?and?views.
CSingleDocTemplate*?pDocTemplate;
pDocTemplate?=?new?CSingleDocTemplate(
IDR_MAINframe
RUNTIME_CLASS(CDatabaseDoc)
RUNTIME_CLASS(CMainframe)???????//?main?SDI?frame?window
RUNTIME_CLASS(CDatabaseView));
AddDocTemplate(pDocTemplate);
//?Parse?command?line?for?standard?shell?commands?DDE?file?open
CCommandLineInfo?cmdInfo;
ParseCommandLine(cmdInfo);
//?Dispatch?commands?specified?on?the?command?line
if?(!ProcessShellCommand(cmdInfo))
return?FALSE;
//?The?one?and?only?window?has?been?initialized?so?show?and?update?it.
m_pMainWnd->ShowWindow(SW_SHOW);
m_pMainWnd->Up
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件??????45396??2011-12-11?09:05??databa
?????文件???????2726??2011-12-11?09:59??databa
?????文件???????4245??2011-12-08?17:54??databa
?????文件???????4597??2011-12-08?17:54??databa
?????文件????????541??2011-12-08?18:04??databa
?????文件???????1378??2011-12-08?17:54??databa
?????文件?????181248??2011-12-11?09:59??databa
?????文件??????51712??2011-12-11?09:59??databa
?????文件????????250??2011-12-11?09:58??databa
?????文件??????12444??2011-12-11?09:05??databa
?????文件???????1782??2011-12-08?17:54??databa
?????文件???????1497??2011-12-08?17:54??databa
?????文件???????8927??2011-12-11?09:58??databa
?????文件???????2199??2011-12-10?17:52??databa
?????文件????4236288??2011-12-10?12:11??databa
?????文件?????147556??2011-12-11?09:58??databa
?????文件?????424484??2011-12-11?09:58??databa
?????文件??????23308??2011-12-10?18:02??databa
?????文件????9538816??2011-12-10?12:01??databa
?????文件?????754688??2011-12-11?09:58??databa
?????文件???????7656??2011-12-11?09:05??databa
?????文件??????????0??2011-12-10?12:01??databa
?????文件??????15140??2011-12-10?12:01??databa
?????文件??????????0??2011-12-10?12:01??databa
?????文件?????110888??2011-12-11?09:58??databa
?????文件??????????0??2011-12-10?12:11??databa
?????文件??????20241??2011-12-10?12:01??databa
?????文件??????????0??2011-12-10?12:01??databa
?????文件??????90739??2006-12-26?21:07??databa
?????文件??????76674??2006-12-26?21:07??databa
............此處省略23個(gè)文件信息
評(píng)論
共有 條評(píng)論