本系统通过ado方式连接access数据库,实现学生信息表的增删改查等操作
代码片段和文件信息
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 36196 2015-08-10 15:25 ADOAccessADOAccess.aps
文件 1588 2015-08-10 15:46 ADOAccessADOAccess.clw
文件 2657 2015-08-10 15:43 ADOAccessADOAccess.cpp
文件 4213 2015-08-10 08:49 ADOAccessADOAccess.dsp
文件 524 2015-08-10 08:49 ADOAccessADOAccess.dsw
文件 1421 2015-08-10 15:43 ADOAccessADOAccess.h
文件 246784 2015-08-10 15:46 ADOAccessADOAccess.ncb
文件 55808 2015-08-10 15:46 ADOAccessADOAccess.opt
文件 252 2015-08-10 15:43 ADOAccessADOAccess.plg
文件 5958 2015-08-10 15:25 ADOAccessADOAccess.rc
文件 8561 2015-08-10 15:38 ADOAccessADOAccessDlg.cpp
文件 1691 2015-08-10 15:33 ADOAccessADOAccessDlg.h
文件 127048 2015-08-10 15:43 ADOAccessDebugADOAccess.exe
文件 381004 2015-08-10 15:43 ADOAccessDebugADOAccess.ilk
文件 44498 2015-08-10 15:43 ADOAccessDebugADOAccess.obj
文件 6928340 2015-08-10 14:04 ADOAccessDebugADOAccess.pch
文件 615424 2015-08-10 15:43 ADOAccessDebugADOAccess.pdb
文件 2924 2015-08-10 15:25 ADOAccessDebugADOAccess.res
文件 98620 2015-08-10 15:43 ADOAccessDebugADOAccessDlg.obj
文件 222015 2012-06-06 13:05 ADOAccessDebugmsado15.tlh
文件 167300 2012-06-06 13:05 ADOAccessDebugmsado15.tli
文件 132915 2015-08-10 14:04 ADOAccessDebugStdAfx.obj
文件 246784 2015-08-10 15:43 ADOAccessDebugvc60.idb
文件 577536 2015-08-10 15:43 ADOAccessDebugvc60.pdb
文件 221931 2012-06-06 13:05 ADOAccessmsado15.tlh
文件 167258 2012-06-06 13:05 ADOAccessmsado15.tli
文件 3633 2015-08-10 08:49 ADOAccessReadMe.txt
文件 1078 2015-08-10 08:49 ADOAccess
esADOAccess.ico
文件 401 2015-08-10 08:49 ADOAccess
esADOAccess.rc2
文件 1055 2015-08-10 15:25 ADOAccess
esource.h
............此处省略9个文件信息
// ADOAccess.cpp : Defines the class behaviors for the application.
//
#include “stdafx.h“
#include “ADOAccess.h“
#include “ADOAccessDlg.h“
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CADOAccessApp
BEGIN_MESSAGE_MAP(CADOAccessApp CWinApp)
//{{AFX_MSG_MAP(CADOAccessApp)
// 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()
/////////////////////////////////////////////////////////////////////////////
// CADOAccessApp construction
CADOAccessApp::CADOAccessApp()
{
// TODO: add construction code here
// Place all significant initialization in InitInstance
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CADOAccessApp object
CADOAccessApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CADOAccessApp initialization
BOOL CADOAccessApp::InitInstance()
{
AfxEnableControlContainer();
//初始换comm环境创建ADO连接
AfxOleInit();
//CoInitialize(NULL);
m_pConnection.CreateInstance(__uuidof(Connection));
try{
m_pConnection->Open(“Provider=Microsoft.Jet.OLEDB.4.0;Data Source=student.mdb“““““adModeUnknown);
}
catch(_com_error e)
{
AfxMessageBox(“数据库连接失败确定数据库student.mdb是否在当前目录中“);
return FALSE;
}
// 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
CADOAccessDlg 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 TRUE;
}
int CADOAccessApp::ExitInstance()
{
if(m_pConnection->GetState())
{
m_pConnection->Close();
m_pConnection = NULL;
}
return CWinApp::ExitInstance();
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 36196 2015-08-10 15:25 ADOAccessADOAccess.aps
文件 1588 2015-08-10 15:46 ADOAccessADOAccess.clw
文件 2657 2015-08-10 15:43 ADOAccessADOAccess.cpp
文件 4213 2015-08-10 08:49 ADOAccessADOAccess.dsp
文件 524 2015-08-10 08:49 ADOAccessADOAccess.dsw
文件 1421 2015-08-10 15:43 ADOAccessADOAccess.h
文件 246784 2015-08-10 15:46 ADOAccessADOAccess.ncb
文件 55808 2015-08-10 15:46 ADOAccessADOAccess.opt
文件 252 2015-08-10 15:43 ADOAccessADOAccess.plg
文件 5958 2015-08-10 15:25 ADOAccessADOAccess.rc
文件 8561 2015-08-10 15:38 ADOAccessADOAccessDlg.cpp
文件 1691 2015-08-10 15:33 ADOAccessADOAccessDlg.h
文件 127048 2015-08-10 15:43 ADOAccessDebugADOAccess.exe
文件 381004 2015-08-10 15:43 ADOAccessDebugADOAccess.ilk
文件 44498 2015-08-10 15:43 ADOAccessDebugADOAccess.obj
文件 6928340 2015-08-10 14:04 ADOAccessDebugADOAccess.pch
文件 615424 2015-08-10 15:43 ADOAccessDebugADOAccess.pdb
文件 2924 2015-08-10 15:25 ADOAccessDebugADOAccess.res
文件 98620 2015-08-10 15:43 ADOAccessDebugADOAccessDlg.obj
文件 222015 2012-06-06 13:05 ADOAccessDebugmsado15.tlh
文件 167300 2012-06-06 13:05 ADOAccessDebugmsado15.tli
文件 132915 2015-08-10 14:04 ADOAccessDebugStdAfx.obj
文件 246784 2015-08-10 15:43 ADOAccessDebugvc60.idb
文件 577536 2015-08-10 15:43 ADOAccessDebugvc60.pdb
文件 221931 2012-06-06 13:05 ADOAccessmsado15.tlh
文件 167258 2012-06-06 13:05 ADOAccessmsado15.tli
文件 3633 2015-08-10 08:49 ADOAccessReadMe.txt
文件 1078 2015-08-10 08:49 ADOAccess
esADOAccess.ico
文件 401 2015-08-10 08:49 ADOAccess
esADOAccess.rc2
文件 1055 2015-08-10 15:25 ADOAccess
esource.h
............此处省略9个文件信息
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)